-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
55 lines (54 loc) · 1.77 KB
/
eslint.config.mjs
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
import antfu from "@antfu/eslint-config";
export default antfu({
formatters: true,
stylistic: {
indent: 4,
quotes: "double",
semi: true,
overrides: {
"style/array-bracket-newline": ["error", { multiline: true }],
"style/array-element-newline": ["error", "consistent"],
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"style/max-statements-per-line": ["error", { max: 2 }],
"style/function-call-argument-newline": ["error", "consistent"],
"style/no-mixed-operators": "error",
"style/no-mixed-spaces-and-tabs": "error",
"style/no-tabs": "error",
},
},
typescript: {
tsconfigPath: "./tsconfig.json",
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
},
overrides: {
"ts/explicit-module-boundary-types": "error",
"ts/consistent-type-imports": ["error", { prefer: "no-type-imports" }],
},
},
rules: {
"antfu/if-newline": "off",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [
["external"],
[
"parent",
"internal",
"builtin",
"sibling",
"index",
],
"object",
"type",
],
"alphabetize": { order: "asc", caseInsensitive: true },
},
],
"import/newline-after-import": ["error", { count: 1 }],
"no-console": ["error", { allow: ["warn", "error"] }],
},
});