Last active
April 13, 2021 04:48
-
-
Save remy/f33649333bc85a4d00d2fbc27209e6ce to your computer and use it in GitHub Desktop.
My Next.js eslint config + `npm install --save-dev eslint eslint-plugin-react babel-eslint`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.next | |
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"es6": true, | |
"commonjs": true | |
}, | |
"globals": { | |
"process": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"ecmaVersion": 9, | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"react" | |
], | |
"rules": { | |
"react/prop-types": 0, | |
"react/jsx-uses-vars": [ | |
2 | |
], | |
"react/jsx-no-undef": "error", | |
"no-console": 0 | |
} | |
} |
Thanks dude
Careful! You install eslint-config-airbnb
but extend eslint:recommended
instead of airbnb
.
Thanks dude
:-D :-D
dumb question, but after doing everything above, how do you run the linter? I was hoping to get it to run on every hot reload like CRA does
Thank you
dumb question, but after doing everything above, how do you run the linter? I was hoping to get it to run on every hot reload like CRA does
You have to configure your IDE (VSCode, WebStorm, etc).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool! Thanks for share this gist