-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
85 lines (79 loc) · 1.71 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
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
import eslint from "@antfu/eslint-config";
export default eslint(
{
stylistic: {
indent: "tab",
quotes: "double",
semi: true,
overrides: {
"style/brace-style": ["error", "1tbs"],
"style/max-len": ["error", { code: 120, tabWidth: 2, ignoreStrings: true }],
"style/jsx-sort-props": [
"warn",
{
shorthandFirst: true,
reservedFirst: true,
callbacksLast: true,
},
],
},
},
isInEditor: false,
typescript: {
overrides: {
"ts/consistent-type-imports": "off",
"ts/consistent-type-definitions": ["error", "type"],
"ts/explicit-member-accessibility": [
"warn",
{ accessibility: "explicit" },
],
"ts/no-floating-promises": "off",
"ts/no-misused-promises": "off",
"ts/no-use-before-define": "off",
},
},
formatters: {
css: true,
markdown: "prettier",
},
vue: false,
},
{
rules: {
"antfu/if-newline": "off",
"prefer-template": "off",
"node/prefer-global/buffer": "off",
"node/prefer-global/process": "off",
"perfectionist/sort-imports": [
"warn",
{
type: "alphabetical",
order: "asc",
ignoreCase: true,
groups: ["side-effect", "type", "builtin", "external", "index", ["internal", "sibling", "parent"], "object"],
internalPattern: ["^~/.*"],
newlinesBetween: "always",
environment: "node",
},
],
"import/consistent-type-specifier-style": ["warn", "prefer-top-level"],
},
},
{
ignores: [
// Build artifacts
"**/dist/**/*",
"**/.turbo/**/*",
"**/.vite/**/*",
// Modules
"**/node_modules/**/*",
],
},
{
files: ["documentation/**/*.md"],
rules: {
"style/max-len": "off",
"perfectionist/sort-imports": "off",
},
},
);