Created
March 29, 2020 20:18
-
-
Save matthewoestreich/67d4e42b75d6feb7889962d541d9e069 to your computer and use it in GitHub Desktop.
eslint-react-boilerplate
This file contains hidden or 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", | |
"parserOptions": { | |
"sourceType": "module", | |
"ecmaVersion": 8, | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"env": { | |
"browser": true, | |
"jest": true | |
}, | |
"extends": ["react-app", "airbnb", "prettier", "prettier/react"], | |
"plugins": ["prettier", "react-hooks"], | |
"rules": { | |
"react-hooks/rules-of-hooks": 2, | |
"react-hooks/exhaustive-deps": 1, | |
"radix": 0, | |
"no-restricted-syntax": 0, | |
"no-await-in-loop": 0, | |
"no-console": 0, | |
"no-underscore-dangle": [ | |
"error", | |
{ | |
"allow": ["__REDUX_DEVTOOLS_EXTENSION__"] | |
} | |
], | |
"consistent-return": 0, | |
"no-param-reassign": [2, { "props": false }], | |
"no-return-assign": [2, "except-parens"], | |
"no-use-before-define": 0, | |
"import/prefer-default-export": 0, | |
"import/no-cycle": 0, | |
"react/no-array-index-key": 0, | |
"react/forbid-prop-types": 0, | |
"react/prop-types": [2, { "skipUndeclared": true }], | |
"react/jsx-fragments": [2, "element"], | |
"react/state-in-constructor": 0, | |
"react/jsx-props-no-spreading": 0, | |
"jsx-a11y/click-events-have-key-events": 0 | |
}, | |
"settings": { | |
// Allows us to lint absolute imports within codebase | |
"import/resolver": { | |
"node": { | |
"moduleDirectory": ["node_modules", "src/"] | |
} | |
} | |
} | |
} |
This file contains hidden or 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
# eslint packages | |
npm i --save-dev eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks | |
# babel packages | |
npm i --save-dev babel-eslint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment