-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
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"