-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
164 lines (164 loc) · 3.77 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"env": {
"node": true,
"es6": true
},
"extends": [
"next/core-web-vitals",
"plugin:storybook/recommended",
"plugin:import/recommended",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"prettier",
"plugin:storybook/recommended"
],
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": ".",
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"ignorePatterns": [
"node_modules/",
"dist/",
"coverage/",
"out/",
"jest.*",
"*.config.js",
"plopfile.mjs",
"src/lib/hooks/swr/*.ts",
"public/*"
],
"plugins": ["@typescript-eslint", "unused-imports"],
"rules": {
"no-console": [
"warn",
{
"allow": ["warn", "error"]
}
],
"semi": ["error", "never"],
"no-duplicate-imports": "error",
"space-in-parens": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"no-self-compare": "error",
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"computed-property-spacing": ["error", "never"],
"func-call-spacing": ["error", "never"],
"indent": [
"error",
2,
{
"SwitchCase": 1,
"flatTernaryExpressions": true,
"offsetTernaryExpressions": true
}
],
"key-spacing": [
"error",
{
"beforeColon": false
}
],
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-whitespace-before-property": "error",
"quotes": ["error", "single", { "avoidEscape": true }],
"rest-spread-spacing": ["error", "never"],
"padding-line-between-statements": ["warn"],
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"import/default": ["off"],
"import/no-unresolved": ["off"],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
"pathGroups": [
{
"pattern": "{vitest,@testing-library/**,}",
"group": "builtin",
"position": "before"
},
{
"pattern": "{react,react-dom/**,react-router-dom,next,next/**,next-auth/**,}",
"group": "builtin",
"position": "before"
},
{
"pattern": "{**/*.css,**/*.scss}",
"group": "type",
"position": "after"
},
{
"pattern": "@public/**",
"group": "type",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"import/no-duplicates": [
"error",
{
"prefer-inline": true
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/restrict-template-expressions": [
"off",
{
"allowNumber": true,
"allowBoolean": false,
"allowAny": false,
"allowNullish": false,
"allowRegExp": false
}
],
"max-params": ["warn", 3]
},
"settings": {
"import/resolver": {
"typescript": {},
"node": {}
}
}
}