-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
31 lines (31 loc) · 1.14 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
module.exports = {
root: true,
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
parser: 'babel-eslint'
},
parser: 'vue-eslint-parser',
env: {
browser: true
},
// 对应依赖 eslint-config-standard、eslint-plugin-vue
extends: ['standard', 'plugin:vue/vue3-recommended'],
// lint *.vue file
plugins: ['vue'],
rules: {
'indent': ['error', 4],
'semi': ['error', 'never'],
'eqeqeq': 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error': 'off',
'space-before-function-paren': ['error', 'never'], // 函数声明时括号与函数名间加空格
// 'no-useless-escape': 'warn' // 禁止不必要的转义
'vue/html-indent': ['error', 4],
'vue/html-closing-bracket-newline': 'off',
'vue/html-closing-bracket-spacing': 'error',
'vue/html-self-closing': ['error', {html: {void: 'never', normal: 'any', component: 'any'}}],
'vue/no-v-html': 'off',
'vue/prop-name-casing': ['error', 'camelCase']
}
}