-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
87 lines (83 loc) · 2.36 KB
/
Copy path.eslintrc.json
File metadata and controls
87 lines (83 loc) · 2.36 KB
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
77
78
79
80
81
82
83
84
85
86
87
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint", "react", "react-hooks", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"rules": {
// General rules
"no-console": ["error", { "allow": ["error"] }],
"no-debugger": "warn",
"no-dupe-else-if": "warn",
"no-irregular-whitespace": "warn",
"no-setter-return": "warn",
"no-unsafe-finally": "warn",
// Best Practices
"accessor-pairs": "error",
"array-callback-return": "warn",
"dot-notation": "warn",
"no-eq-null": "warn",
"no-eval": "error",
"no-cond-assign": "warn",
"no-prototype-builtins": "warn",
"no-inner-declarations": "warn",
"no-implicit-globals": "warn",
"no-type-assertion/no-type-assertion": "off",
"no-implied-eval": "error",
"no-new-func": "warn",
"no-return-await": "warn",
"no-proto": "warn",
"no-useless-catch": "warn",
"no-with": "error",
"require-await": "warn",
"no-extra-boolean-cast": "warn",
"no-empty": "off",
"no-case-declarations": "warn",
"no-global-assign": "warn",
"linebreak-style": 0,
"no-bitwise": "warn",
"no-nested-ternary": "warn",
"no-unneeded-ternary": "warn",
"spaced-comment": ["warn", "always"],
//ES6
"no-var": "warn",
"prefer-const": "warn",
// TypeScript specific rules
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
// Ignore no-unused-vars if prefixed with underscore
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
},
"settings": {
"react": {
"version": "detect"
}
}
}