-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
65 lines (63 loc) · 2.29 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:react/recommended",
"prettier/react",
"prettier/standard",
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"jsdoc",
"import",
"prettier",
"react-hooks"
],
"parserOptions": {
"project": ["tsconfig.json"],
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true // Allows for the parsing of JSX
},
"sourceType": "module", // Allows for the use of imports
"ecmaVersion": 2020 // Allows for the parsing of modern ECMAScript features
},
"rules": {
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/require-await": "off",
// "comma-dangle": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"default-case": "off",
"import/extensions": "off",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-param-reassign": "off",
"no-restricted-syntax": "off",
"prettier/prettier": "error"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts", ".tsx"]
}
},
"react": {
"version": "detect"
}
}
}