-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc
88 lines (88 loc) · 2.17 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parser": "@babel/eslint-parser",
"env": {
"node": true,
"es6": true,
"browser": true
},
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {}
}
},
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"plugins": ["@babel", "react-hooks"],
"rules": {
"no-trailing-spaces": "warn",
"no-unreachable": "warn",
"no-console": "warn",
"array-bracket-spacing": "warn",
"no-unused-vars": "warn",
"no-extra-semi": "warn",
"quotes": ["warn", "single", {"avoidEscape": true, "allowTemplateLiterals": true}], // Checks for single quote usage where possible
"jsx-quotes": ["warn", "prefer-single"],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js", ".jsx", ".ts", ".tsx"
]
}
],
"react/prop-types": "off",
"indent": [
"warn",
2,
{
"SwitchCase": 1
}
],
"@babel/implicit-arrow-linebreak": "off",
"@babel/array-bracket-newline": "off",
"@babel/brace-style": "off",
"@babel/semi": "warn"
},
"overrides": [
{
"files": ["src/**/*.{ts,tsx}"],
"plugins": [
"@typescript-eslint",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"],
},
"rules": {
"no-undef": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended"
]
}
]
}