-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
87 lines (87 loc) · 2.08 KB
/
.eslintrc.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
module.exports = {
root: true,
env: {
es2022: true,
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
extends: ["@antfu", "plugin:unicorn/recommended"],
plugins: ["unicorn"],
rules: {
// Default rules
"arrow-parens": ["error", "always"],
"comma-dangle": "off",
"curly": "off",
"array-callback-return": "off",
"no-console": "warn",
"operator-linebreak": "off",
// Unicorn rules
"unicorn/prefer-module": "off",
"unicorn/filename-case": [
"error",
{
cases: {
kebabCase: true,
pascalCase: true,
},
},
],
"unicorn/no-nested-ternary": "off",
"unicorn/no-unused-properties": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/no-null": "off",
// Typescript rules
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/member-delimiter-style": ["error", {
multiline: {
delimiter: "semi",
requireLast: true,
},
singleline: {
delimiter: "semi",
requireLast: false,
},
multilineDetection: "brackets",
}],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
"@typescript-eslint/comma-dangle": [
"warn",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
enums: "always-multiline",
generics: "never",
tuples: "never",
exports: "never",
functions: "never",
},
],
// Vue rules
"vue/html-self-closing": ["warn", {
svg: "always",
html: {
void: "always",
normal: "always",
},
}],
"vue/operator-linebreak": [
"error",
"after",
],
},
overrides: [
{
files: ["*.vue"],
rules: {
"vue/singleline-html-element-content-newline": "off",
},
},
],
};