-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
36 lines (36 loc) · 1.55 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "import"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }], // Prevents declaring vars and not using them
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react/jsx-curly-brace-presence": ["error", "never"], // Checks unneccessary use of brackets in JSX
"react/no-unknown-property": ["error", { "ignore": ["about"] }], // Prevents the usage of unkown properties on react elements
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }], // Prevents multiple empty lines
"no-useless-return": "error", // Prevents unneccessary return statements
"react/react-in-jsx-scope": "off", // Starting from React v17 we no longer need the explicit React import in JSX
"react-hooks/exhaustive-deps": "off" // Disables the exhaustive-deps rule for the next line
},
"settings": {
"react": {
"version": "detect"
}
}
}