-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
95 lines (94 loc) · 2.57 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
const isProd = process.env.NODE_ENV === "production";
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["eslint:recommended", "plugin:vue/base", "plugin:vue/vue3-essential", "plugin:vue/vue3-strongly-recommended", "plugin:vue/vue3-recommended"],
parserOptions: {
ecmaVersion: 12,
parser: "@typescript-eslint/parser",
sourceType: "module",
},
globals: {
process: true,
module: true,
__dirname: true,
require: true,
},
plugins: ["vue", "@typescript-eslint"],
rules: {
"@typescript-eslint/indent": [2, "tab"],
"no-shadow": 0,
"@typescript-eslint/no-shadow": ["error"],
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": ["error"],
quotes: [2, "single"],
semi: [2, "always"],
"vue/html-indent": [2, "tab"],
"vue/script-indent": 0,
"no-console": isProd ? 2 : 0,
eqeqeq: 2,
"array-callback-return": 1,
curly: [2],
"default-case": 1,
"no-alert": 2,
"no-else-return": 1,
"no-empty-function": 2,
"no-eval": 2,
"no-param-reassign": 2,
"no-use-before-define": 2,
yoda: [2, "never"],
"block-spacing": 2,
"eol-last": 1,
"comma-style": [2, "last"],
"comma-spacing": [
2,
{
before: false,
after: true,
},
],
"comma-dangle": [2, "always-multiline"],
camelcase: 2,
"brace-style": 2,
"key-spacing": [
2,
{
beforeColon: false,
},
],
"linebreak-style": [2, "unix"],
"multiline-ternary": [2, "always-multiline"],
"no-var": 2,
"no-lonely-if": 2,
"no-trailing-spaces": 2,
"no-whitespace-before-property": 2,
"object-property-newline": 2,
"object-curly-spacing": [2, "always"],
"no-duplicate-imports": 2,
"no-useless-constructor": 2,
"object-shorthand": [
2,
"always",
{
avoidQuotes: true,
},
],
"prefer-const": 2,
"prefer-destructuring": [
2,
{
array: true,
object: true,
},
{
enforceForRenamedProperties: false,
},
],
"prefer-rest-params": 2,
"prefer-spread": 2,
"prefer-template": 2,
"vue/require-default-prop": 0,
},
};