-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
42 lines (41 loc) · 1.01 KB
/
.eslintrc.cjs
File metadata and controls
42 lines (41 loc) · 1.01 KB
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'standard',
// 新增这里vue3支持
'plugin:vue/vue3-recommended',
],
// 新的内容
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
modules: true,
},
requireConfigFile: false,
parser: '@babel/eslint-parser',
},
plugins: ['vue'],
rules: {
semi: 'off', // 禁止尾部使用分号
quotes: 'off', // 使用单引号
indent: 0,
'space-before-function-paren': 0,
'comma-dangle': 'off',
'no-var': 'error', // 禁止使用 var
'no-mixed-spaces-and-tabs': 'error', // 不能空格与tab混用
'vue/html-closing-bracket-newline': 'off', // 不强制换行
'vue/singleline-html-element-content-newline': 'off', // 不强制换行
'vue/max-attributes-per-line': [
'error',
{
singleline: { max: 5 },
multiline: { max: 5 },
},
], // vue template模板元素第一行最多5个属性
},
}