Skip to content

Instantly share code, notes, and snippets.

@tavareshenrique
Created July 15, 2020 00:37
Show Gist options
  • Save tavareshenrique/712f11fe8c6f4dfbc3c76b1534130735 to your computer and use it in GitHub Desktop.
Save tavareshenrique/712f11fe8c6f4dfbc3c76b1534130735 to your computer and use it in GitHub Desktop.
ESLint React
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [
".tsx"
]
}
],
"react/prop-types": "off",
"react/no-array-index-key": "off",
"no-return-assign": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"import/prefer-default-export": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
]
},
"settings": {
"import/resolver": {
"typescript": {
},
"babel-plugin-root-import": {
"rootPathPrefix": "~",
"rootPathSuffix": "src"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment