-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy patheslint.config.mjs
More file actions
97 lines (94 loc) · 2.15 KB
/
eslint.config.mjs
File metadata and controls
97 lines (94 loc) · 2.15 KB
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
import eslintConfig from "@antfu/eslint-config";
import nuxtConfig from "./.nuxt/eslint.config.mjs";
export default eslintConfig(
// General
{
typescript: true,
vue: true,
stylistic: {
indent: 2,
quotes: "double"
},
rules: {
curly: "off",
"eol-last": "off",
"jsonc/indent": "off",
"no-console": "off",
"no-new-func": "off",
"style/semi": ["error", "always"],
"style/indent": ["error", 2],
"style/quotes": "off",
"style/member-delimiter-style": "error",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"style/quote-props": ["warn", "as-needed"],
"style/comma-dangle": ["warn", "never"],
"style/brace-style": ["warn", "1tbs"],
"style/arrow-parens": ["error", "always"],
"vue/attributes-order": [
"error",
{
order: [
"DEFINITION",
"LIST_RENDERING",
"CONDITIONALS",
"RENDER_MODIFIERS",
"GLOBAL",
"UNIQUE",
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
"OTHER_ATTR",
"EVENTS",
"CONTENT"
],
alphabetical: false
}
],
"vue/block-order": [
"error",
{
order: ["script", "template", "style"]
}
],
"vue/script-indent": [
"error",
2,
{
baseIndent: 0
}
],
"vue/html-indent": [
"error",
2,
{
attribute: 1,
baseIndent: 1,
closeBracket: 0
}
],
"vue/comma-dangle": ["warn", "never"],
"antfu/top-level-function": "off",
"antfu/if-newline": "off",
"new-cap": "off",
"node/prefer-global/process": ["off"],
"@typescript-eslint/prefer-ts-expect-error": "off"
}
},
// Vue
{
files: ["**/*.vue"],
rules: {
"style/indent": "off",
"vue/script-indent": "off"
}
},
nuxtConfig()
);