Skip to content

Instantly share code, notes, and snippets.

@diaraujo13
Last active March 15, 2021 16:00
Show Gist options
  • Save diaraujo13/e1e264a3abfcc986ca2cdff41910acfe to your computer and use it in GitHub Desktop.
Save diaraujo13/e1e264a3abfcc986ca2cdff41910acfe to your computer and use it in GitHub Desktop.
ESLINT REACT CONFIG
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'prettier',
"plugin:react-hooks/recommended",
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'prettier',
"react-hooks"
],
rules: {
'prettier/prettier': 'error',
"react/jsx-filename-extension": [
"error",
{
"extensions": [".js", ".jsx"]
}
],
"import/no-named-as-default": "off",
"react/prop-types": "off",
"global-require": "off",
"import/prefer-default-export": "off",
"react/no-array-index-key": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-one-expression-per-line": "off",
"no-unused-expressions": [
"error",
{ "allowTaggedTemplates": true }
],
"camelcase": "off",
"no-param-reassign": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
settings: {
'import/resolver': {
"alias": {
map: [
["~", "./src"]
]
},
},
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment