forked from bhuh12/vue-router-tab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
38 lines (37 loc) · 1000 Bytes
/
.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
const isProd = process.env.NODE_ENV === 'production'
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
parser: 'babel-eslint',
ecmaFeatures: {
// 支持装饰器
legacyDecorators: true
}
},
// ESlint 规则:https://eslint.org/docs/rules/
// Vue 规则:https://eslint.vuejs.org/rules/
rules: {
'no-console': 'off',
'no-debugger': isProd ? 'warn' : 'off',
'no-unused-vars': 'warn',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-prototype-builtins': 'off',
'vue/no-v-html': 'off',
'vue/no-unused-vars': 'warn',
'vue/require-default-prop': 'off',
'vue/no-mutating-props': 'off',
// Vue 单文件块空行
'vue/padding-line-between-blocks': 2,
// 多行属性添加空行
'vue/new-line-between-multi-line-property': [
'error',
{
minLineOfMultilineProperty: 2
}
]
}
}