-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
42 lines (35 loc) · 1.11 KB
/
.eslintrc
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
{
"root": true,
"env": { "browser": true, "es2020": true },
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "react-refresh"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"ignorePatterns": ["dist", "index.html"],
"rules": {
// validate that your components can safely be updated with fast refresh.
"react-refresh/only-export-components": [
"warn",
{ "allowConstantExport": true }
],
// fail on prettier errors
"prettier/prettier": ["error"],
// allow unused vars for hints
"eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["off"],
// good practice to use the type-safe equality operators
"eqeqeq": "error",
// explicit is good for clarity
"@typescript-eslint/no-inferrable-types": "off",
// allow to use banned types (like {})
"@typescript-eslint/ban-types": "off",
// allow function overloads
"no-redeclare": "off",
// allow to force re-render hooks deps
"react-hooks/exhaustive-deps": "off"
}
}