-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc
66 lines (65 loc) · 1.67 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"ignorePatterns": ["dist/**", "node_modules/**"],
"env": {
"es2021": true,
"browser": true,
"node": true
},
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["react", "@typescript-eslint", "react-hooks"],
"rules": {
"@typescript-eslint/ban-types": [
2,
{
"types": {
"any": "Don't use 'any' because it is unsafe"
},
"extendDefaults": true
}
],
"semi": ["warn", "never"],
"quotes": [
1,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"no-use-before-define": [
"off",
{ "functions": false, "classes": false, "variables": true }
],
// "no-underscore-dangle": ["error", { "allow": ["_foo"] }],
"react/react-in-jsx-scope": "off",
// allow jsx syntax in js files (for next.js project)
"react/jsx-filename-extension": [
1,
{ "extensions": [".js", ".jsx", ".tsx"] }
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"no-inner-declarations": "off",
"prefer-const": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"react/display-name": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off"
}
}