-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.js
41 lines (41 loc) · 1.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
// https://zh.nuxtjs.org/guide/development-tools
// 暂时和移动端统一eslint
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false
},
extends: [
'eslint:recommended',
'plugin:vue/essential',
'plugin:vue/strongly-recommended',
'plugin:vue/recommended'
],
rules: {
'vue/singleline-html-element-content-newline': ['error', {
ignores: [
'p', 'span', 'time', 'a',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
]
}],
'vue/max-attributes-per-line': ['error', {
singleline: 3,
multiline: {
max: 1,
allowFirstLine: false
}
}],
quotes: [2, 'single'], // https://eslint.org/docs/2.0.0/rules/quotes
semi: [2, 'never'], // https://eslint.org/docs/2.0.0/rules/semi
// https://github.com/ElemeFE/eslint-config-elemefe/blob/master/rules.js
// // https://cn.eslint.org/docs/rules/
'no-console': 0,
indent: [1, 2, { SwitchCase: 1 }],
'vue/no-v-html': 'off' // 关闭v-html检测
}
}