This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
76 lines (76 loc) · 2.17 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
66
67
68
69
70
71
72
73
74
75
76
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react-hooks"],
"ignorePatterns": [".eslintrc.js"],
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"env": {
"es6": true,
"browser": true,
"jest": true,
"node": true
},
"rules": {
"react/react-in-jsx-scope": 0,
"@typescript-eslint/no-explicit-any": "warn",
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "^_"
}
],
"no-console": [
2,
{
"allow": ["warn", "error"]
}
]
},
"settings": {
"react": {
"version": "detect" // React version. "detect" automatically picks the version you have installed.
}
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": ["airbnb-typescript", "plugin:prettier/recommended"],
"rules": {
"no-cond-assign": "warn",
"no-param-reassign": "warn",
"@typescript-eslint/no-loop-func": "warn",
"class-methods-use-this": "warn",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-shadow": "warn",
"no-nested-ternary": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"import/no-extraneous-dependencies": "warn",
"global-require": "warn",
"import/no-dynamic-require": "warn",
"consistent-return": "warn",
"import/no-cycle": "warn",
"@typescript-eslint/no-redeclare": "warn",
"default-case": "warn",
"prefer-destructuring": "warn",
"no-await-in-loop": "warn",
"no-return-assign": "warn",
"prefer-rest-params": "warn",
"import/no-duplicates": "warn",
"array-callback-return": "warn"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
}
}
]
}