-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace all 'athName' with 'athname' for consistency (#70690)
### What? Consistently casing of pathname throughout the code-base. It is a simple search and replace of all the ocuences 'athName' to 'athname'. ### Why? I believe that the usage of the casing [pP]athName is likely a mistake, as it is usually typed [pP]athname in the rest of the repo. I think a case sensitive search replace from 'athName' to 'athname' would be a small thing, and prevent this from growing. ### How? I searched for pathname in the repo, and found a huge amount of hits. Searching for 'athName' only returned a few. The usePathname hook was the reason I came across this inconsistency. We had the inconsistency in our own Next.js project, ie. `const pathName = usePathname()`, and I noticed that when searching inside my project with cases-sensitivity I found two hits of 'pathName' inside the documentation for LoadableManifest. This lead me to fork the repo and search, and then I found a few more cases. In each file I did a search for conflicts: if for example pathname was already defined, it would be considered breaking if I changed a pathName to pathname. I could not find any cases where the variable was defined twice with the same casing, so I believe this PR is safe. I guess the test coverage/pipeline will tell us if this change is breaking? If not I don't think I would be able to contribute that much further in the time of writing. Co-authored-by: JJ Kasper <[email protected]>
- Loading branch information
Showing
7 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use client' | ||
|
||
export { ReadPathName as default } from '../../components/read-path-name' | ||
export { ReadPathname as default } from '../../components/read-path-name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use client' | ||
|
||
export { ReadPathName as default } from '../../components/read-path-name' | ||
export { ReadPathname as default } from '../../components/read-path-name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters