Skip to content

Instantly share code, notes, and snippets.

@umer4ik
Created August 10, 2022 09:09
Show Gist options
  • Save umer4ik/daff5132d849d9c480f89a904b840fc4 to your computer and use it in GitHub Desktop.
Save umer4ik/daff5132d849d9c480f89a904b840fc4 to your computer and use it in GitHub Desktop.
Default configuration of eslint
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks"
],
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"array-callback-return": [
"error"
],
"no-await-in-loop": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-promise-executor-return": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"require-atomic-updates": "error",
"arrow-body-style": [
"error"
],
"react/prop-types": "warn",
"react/button-has-type": "warn",
"react/default-props-match-prop-types": "error",
"react/destructuring-assignment": "warn",
"array-bracket-spacing": [
"error",
"never"
],
"arrow-parens": [
"error",
"as-needed"
],
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"comma-dangle": [
"error",
"never"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"comma-style": [
"error",
"last"
],
"computed-property-spacing": [
"error",
"never"
],
"eol-last": "error",
"func-call-spacing": "error",
"function-call-argument-newline": [
"error",
"consistent"
],
"implicit-arrow-linebreak": [
"error"
],
"jsx-quotes": [
"error",
"prefer-double"
],
"key-spacing": "error",
"keyword-spacing": "error",
"lines-between-class-members": "error",
"max-statements-per-line": [
"error",
{
"max": 2
}
],
"new-parens": "error",
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": [
"error",
"beside"
],
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"error",
"before"
],
"padded-blocks": [
"error",
"never"
],
"rest-spread-spacing": [
"error",
"never"
],
"semi-spacing": "error",
"semi-style": [
"error",
"last"
],
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": [
"error",
"never"
],
"space-infix-ops": "error",
"space-unary-ops": "error",
"switch-colon-spacing": "error",
"template-curly-spacing": "error",
"template-tag-spacing": "error",
"wrap-iife": [
"error",
"inside"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment