-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next lint command doesn't work #30062
Comments
I have encounter the same issue. |
@mykhailo-motornyi-improveit |
Hello. Eslint 8 is not supported yet. In the meantime, you can downgrade to Eslint 7. |
@tooshikii and @thibautsabot are correct, ESLint 8 is not yet supported so please downgrade to v7 for the meantime
Closing this since it's a duplicate! |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
11.1.2
What version of Node.js are you using?
14.7.0
What browser are you using?
Chrome
What operating system are you using?
macOS, Windows
How are you deploying your application?
Vercel
Describe the Bug
When I run next lint I receive an error
error - ESLint must be installed: yarn add --dev eslint
.In package.json I have eslint installed "eslint": "^8.0.1".
Also my IDE works with local eslint correctly.
package.json
"scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "format": "prettier --write src/**/*.{js,jsx,ts,tsx,css,md,json} --config ./.prettierrc" },
...
"devDependencies": { "@commitlint/cli": "^13.2.1", "@commitlint/config-conventional": "^13.2.0", "autoprefixer": "^10.3.7", "eslint": "^8.0.1", "eslint-config-next": "^11.1.2", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-simple-import-sort": "^7.0.0", "husky": "^7.0.2", "postcss": "^8.3.9", "prettier": "^2.4.1" }
eslint.json
{ "extends": ["next/core-web-vitals", "plugin:prettier/recommended"], "plugins": ["simple-import-sort"], "rules": { "prettier/prettier": ["error", {}, { "usePrettierrc": true }], "simple-import-sort/imports": "error", "simple-import-sort/exports": "error" } }
Without simple-import-sort plugin bug is also reproducing
Expected Behavior
ESLint should work
To Reproduce
Install next 11.1.2
Add script "lint": "next lint" to your package.json
Run "yarn lint"
The text was updated successfully, but these errors were encountered: