-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
113 lines (112 loc) · 2.93 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"next/core-web-vitals",
"plugin:storybook/recommended",
"prettier"
],
"rules": {
"no-duplicate-imports": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"capitalized-comments": "error",
"default-case-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"init-declarations": "error",
"no-array-constructor": "error",
"no-console": ["error", { "allow": ["info", "warn", "error"] }],
"no-eval": "error",
"no-extra-bind": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-label-var": "error",
"no-labels": "error",
"no-loop-func": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-throw-literal": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"prefer-arrow-callback": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"prefer-const": "error",
"require-await": "error",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
},
"pathGroups": [
{
"pattern": "@/**",
"group": "parent"
}
],
"newlines-between": "always"
}
],
"import/no-named-as-default-member": "off",
"react/forbid-prop-types": "error",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/hook-use-state": "error",
"react/jsx-filename-extension": [
"error",
{
"extensions": [".jsx", ".tsx"]
}
],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-handler-names": "error",
"react/jsx-no-useless-fragment": "error",
"react/jsx-pascal-case": "error",
"react/jsx-sort-props": "error",
"react/no-danger": "error",
"react/no-unsafe": "error",
"react/prefer-read-only-props": "error"
},
"overrides": [
{
"extends": [
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/typescript"
],
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/restrict-template-expressions": ["error", { "allowNumber": true, "allowBoolean": true }]
}
},
{
"files": ["tests/**/*.ts", "tests/**/*.tsx", "unittests/**/*.ts", "unittests/**/*.tsx"],
"rules": {
"init-declarations": "off",
"no-loop-func": "off"
}
}
],
"parserOptions": {
"project": true,
"tsconfigRootDir": "."
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"env": {
"browser": true,
"node": true
}
}