Skip to content

Instantly share code, notes, and snippets.

@NiravBhuva
Created May 6, 2025 11:16
Show Gist options
  • Save NiravBhuva/09a0aeddb866a8a16eccc4340d876a81 to your computer and use it in GitHub Desktop.
Save NiravBhuva/09a0aeddb866a8a16eccc4340d876a81 to your computer and use it in GitHub Desktop.
Basic .eslintrc for Node and React
{
"env": {
"browser" : true,
"node" : true,
"commonjs": true,
"es6" : true
},
"extends": "eslint:recommended",
"parser" : "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"warn",
"tab",
{"SwitchCase" : 1}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"off",
"single"
],
"semi": [
"warn",
"always"
],
"eqeqeq" : ["warn", "always"],
"no-extra-semi" : "warn",
"no-empty" : "warn",
"no-unused-vars" : "warn",
"react/jsx-uses-vars" : "warn",
"react/jsx-uses-react" : "warn"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment