Open juanzgc opened 1 year ago
Linting is currently not applied to app/
, so this is expected.
The source code is here: https://github.com/vercel/next.js/blob/0a2ae766a8c0df6f102c59b7f37abcbb50af698d/packages/next/lib/constants.ts#L45
Linting is currently not applied to
app/
, so this is expected.The source code is here:
Had a moment where this behaviour confused me as I was running next lint
in the console and it was saying there were no warnings or errors.
Would it make sense to add app
to the default directories at this stage? Or otherwise make next lint
check for the appDir
feature flag, or at least show a warning to the user that app/*
isn't linted on the default settings?
here is another ticket about the same problem: https://github.com/vercel/next.js/issues/44424 and it has a PR https://github.com/vercel/next.js/pull/44426
Is there any possibility of being able to configure other folders than the default ones in development?
For example in my case i don't want to put (services, providers, tests) folders, all inside app just for linting.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Linting is not currently happening on the
/app
directory. I've addedprettier
and when testing withyarn lint
it works on/pages
directory however, it doesn't catch errors in the/app
directory.Expected Behavior
yarn lint
should provide the same linting errors asyarn run eslint
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
n/a
To Reproduce
.eslintrc.json
:.prettierrc.json
:Then in the
/app
directory include semicolons and double quotes. You expect to see an ESLint error that comes from Prettier however, that is not the case.fwiw, a temporary fix is found in: https://nextjs.org/docs/basic-features/eslint#linting-custom-directories-and-files