-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
111 lines (111 loc) · 1.96 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = {
root: true,
env: {
node: true
},
extends: [
"plugin:vue/vue3-essential",
"@vue/standard",
"@vue/typescript/recommended"
],
parser: "vue-eslint-parser",
parserOptions: {
// parser: "babel-eslint",
parser: "@typescript-eslint/parser",
ecmaVersion: 2020
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
eqeqeq: "error",
"no-tabs": "off",
"no-constant-condition": "off",
"for-direction": "error",
"func-call-spacing": "error",
semi: ["error", "always"],
"semi-spacing": [
"error",
{
before: false,
after: true
}
],
"semi-style": ["error", "last"],
"space-before-function-paren": [
"error",
{
anonymous: "never",
named: "never",
asyncArrow: "always"
}
],
indent: [
"error",
"tab",
{
SwitchCase: 1
}
],
"init-declarations": ["error", "always"],
"jsx-quotes": ["error", "prefer-double"],
quotes: ["error", "double"],
"key-spacing": [
"error",
{
beforeColon: false,
afterColon: true
}
],
"keyword-spacing": [
"error",
{
overrides: {
if: {
after: true
},
for: {
after: true
},
while: {
after: true
}
}
}
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-this-alias": ["off"],
"spaced-comment": ["off"]
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
mocha: true
}
},
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
jest: true
}
},
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
jest: true
}
}
]
};