Skip to content

Instantly share code, notes, and snippets.

@blogscot
Created August 13, 2017 12:47
Show Gist options
  • Save blogscot/baf55caaf99cb1f327afa457c09d8939 to your computer and use it in GitHub Desktop.
Save blogscot/baf55caaf99cb1f327afa457c09d8939 to your computer and use it in GitHub Desktop.
My starter Eslint configuration
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2015,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["react", "prettier"],
"globals": {
"document": true,
"window": true
},
"rules": {
"eqeqeq": "warn",
"indent": ["error", 2],
"semi": [2, "never"],
"no-undefined": "warn",
"no-console": 1,
"no-debugger": 1,
"no-var": 1,
"no-trailing-spaces": 1,
"eol-last": 1,
"no-unused-vars": 1,
"no-underscore-dangle": 1,
"no-alert": 1,
"no-lone-blocks": 1,
"jsx-quotes": 1,
"react/display-name": [1, { "ignoreTranspilerName": false }],
"react/forbid-prop-types": [1, { "forbid": ["any"] }],
"react/jsx-boolean-value": 1,
"react/jsx-closing-bracket-location": 1,
"react/jsx-curly-spacing": 1,
"react/jsx-indent-props": ["warn", 2],
"react/jsx-key": 1,
"react/jsx-max-props-per-line": 1,
"react/jsx-no-bind": 0,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 0,
"react/jsx-no-undef": 1,
"react/jsx-pascal-case": 1,
"react/jsx-sort-prop-types": 0,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-danger": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 1,
"react/no-multi-comp": 0,
"react/no-set-state": 0,
"react/no-unknown-property": 1,
"react/prefer-es6-class": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/sort-comp": 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment