Skip to content

Instantly share code, notes, and snippets.

@DaviGn
Last active June 16, 2022 22:08
Show Gist options
  • Save DaviGn/5a809701c6d307acca20cda65069fb17 to your computer and use it in GitHub Desktop.
Save DaviGn/5a809701c6d307acca20cda65069fb17 to your computer and use it in GitHub Desktop.
ESLint React settings
{
"env": {
"es6": true,
"es2021": true,
"jest": true
},
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "prettier"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-use-before-define": ["error"],
"camelcase": "off",
"import/extensions": "off",
"import/no-duplicates": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"import/no-unresolved": "off",
"import/order": "off",
"import/prefer-default-export": "off",
"indent": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/no-static-element-interactions": "off",
"no-bitwise": "off",
"no-empty": "off",
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-promise-executor-return": "off",
"no-plusplus": "off",
"no-shadow": "off",
"no-underscore-dangle": "off",
"no-unsafe-optional-chaining": "off",
"no-unused-expressions": "off",
"no-use-before-define": "off",
"object-curly-spacing": [
"error",
"always",
{
"arraysInObjects": true
}
],
"prettier/prettier": 0,
"react/display-name": "off",
"react/function-component-definition": "Off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [".tsx"]
}
],
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/no-unused-prop-types": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error"
},
"settings": {
"import/resolver": {
"typescript": {},
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment