-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
94 lines (93 loc) · 2.81 KB
/
eslint.config.js
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
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginVue from "eslint-plugin-vue";
export default [
{ files: ["**/*.{js,mjs,cjs,vue,.ts}"] },
{ languageOptions: { globals: { ...globals.browser, process: "readonly" } } },
pluginJs.configs.recommended,
...pluginVue.configs["flat/essential"],
{
ignores: ["node_modules/*", "dist/*", ".git/*"]
},
{
rules: {
"array-bracket-spacing": ["error", "never"],
"comma-dangle": ["error", "never"],
indent: ["error", 4],
"object-curly-spacing": ["error", "always"],
quotes: ["error", "double"],
semi: ["error", "always"],
"sort-imports": [
"error",
{
allowSeparatedGroups: true,
ignoreCase: true,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
}
],
"vue/first-attribute-linebreak": [
"error",
{
multiline: "below",
singleline: "ignore"
}
],
"vue/html-closing-bracket-newline": [
"error",
{
multiline: "always",
selfClosingTag: {
multiline: "always",
singleline: "never"
},
singleline: "never"
}
],
"vue/html-indent": ["error", 4],
"vue/html-self-closing": [
"error",
{
html: {
component: "always",
normal: "never",
void: "always"
}
}
],
"vue/max-attributes-per-line": [
"error",
{
multiline: {
max: 1
},
singleline: {
max: 1
}
}
],
"vue/no-deprecated-slot-attribute": [
"error",
{
ignore: ["md-icon"]
}
],
"vue/script-indent": ["error", 4]
}
},
{
files: ["src/**/*.vue"],
rules: {
"vue/sort-keys": [
"error",
"asc",
{
caseSensitive: true,
ignoreChildrenOf: ["model", "methods"],
ignoreGrandchildrenOf: ["computed", "directives", "inject", "methods", "props", "watch"],
minKeys: 2,
natural: false
}
]
}
}
];