-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
47 lines (47 loc) · 1.11 KB
/
.eslintrc.cjs
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
module.exports = {
'env': {
'browser': true,
'es2021': true
},
'extends': [
'eslint:recommended',
'plugin:vue/vue3-essential',
'./.eslintrc-auto-import.json'
],
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'plugins': [
'vue'
],
'rules': {
'eqeqeq': 'warn', // 要求使用 === 和 !==
'semi': ['error', 'always'], // 要求或禁止使用分号代替 ASI
'indent': ['error', 2], // 强制使用一致的缩进
'quotes': ['error', 'single'], // 强制使用一致的反勾号、双引号或单引号
'arrow-spacing': 'error', // 强制箭头函数的箭头前后使用一致的空格
'no-unused-vars': [ // 禁止出现未使用过的变量
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'space-before-function-paren': 'off',
'vue/multi-word-component-names': 'off',
}
};