Enforce directory casing in `filename-case`
See original GitHub issueWe’d like to enforce casing of both files and directories. Is that possible, or would it need some kind of “root” directory to avoid caring about directory name outside of the project? Easy enough to achieve with js config files I guess. There is context.getCwd()
, could probably work as well
Issue Analytics
- State:
- Created 3 years ago
- Reactions:21
- Comments:15 (2 by maintainers)
Top Results From Across the Web
How can I enforce filename and folder name convention in ...
I am looking for a rule which can enforce filename to be camelCase and folder name to be snake_case . How can I...
Read more >Filename case changes broken in pull request.
A file rename only involving case changes doesn't show up properly in a pull request, even though they show correctly in the local...
Read more >eslint-plugin-unicorn - npm
Name Description 💼 🚫 🔧 💡
consistent‑destructuring Use destructured variables over properties. ✓ 🔧 💡
custom‑error‑definition Enforce correct Error subclassing. ✓ 🔧
empty‑brace‑spaces Enforce no spaces...
Read more >Git basics: Help my case-sensitive filename changes don't ...
There are some other ways of doing this as well. What is your preferred way of renaming a case-sensitive file/folder in Git? You...
Read more >File Name Case Sensitivity | VisualSVN Help Center
Unix is case-sensitive. Subversion works on both platforms and this may be a problem. If you add to some folder in Subversion repository...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Stop thinking about BREAKING/NON-BRAKING, just make it correct, it’s never been something we care. https://github.com/sindresorhus/eslint-plugin-unicorn/issues/686#issuecomment-1320449464
Unfortunately that wasn’t clear to me in the initial issue, @SimenB.
filename-case
, which could be confusing to people if it starts checking the entire path without an opt-in/out. I’m not worried about a breaking change as much as breaking behaviour unexpectedly.We could ship the rule today as minor change with an opt-in - as it’s ready to go - and wait for further feedback before pushing forward in another direction.