next-lint: lint entire src directory
See original GitHub issueDescribe the feature you’d like to request
By default, the next lint
only lints a select few directories:
Which is also confirmed in the docs here so this seems like it is the intentional behavior.
I believe linting the entire /src
directory would be a good default behavior.
Describe the solution you’d like
By default, next-lint
should lint the entire /src
directory as well as the other select few directories outside src
(pages, components, lib) for people not adopting the src structure.
Describe alternatives you’ve considered
You can achieve this today by modifying the lint script like this:
”lint”: “next lint —dir src”
I feel like if you are adopting putting all files in src instead of having the directories in the project root (like the default examples have), there is no real point in not running the linter over all subdirectories. Outside src there might be directories you would want to treat differently (perhaps script etc) so limiting it to a select few here seems reasonable.
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:6 (1 by maintainers)
Top GitHub Comments
Thanks for the feedback here folks. There’s no particular reason why the entire
src/
isn’t linted to be honest aside from my thinking that there may be some directory structures that folks would want to treat differently inside ofsrc/
. But I agree that’s not likely the case.I can submit an update to fix this behavior 🙏
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.