-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
42 lines (42 loc) · 1.09 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
42
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:vue/vue3-essential',
'airbnb-base',
],
parserOptions: {
ecmaVersion: 13,
sourceType: 'module',
},
plugins: [
'vue',
],
rules: {
'space-before-function-paren': 0, // 函数前的空格为0
'import/no-unresolved': 'off', // 通过该句话解决path no-unresolved报错
// 配置开发模式允许console和debugger
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-plusplus': [ // 禁止++运算符报错
'off',
{
allowForLoopAfterthoughts: true,
},
],
'vue/comment-directive': 'off', // 允许在标签中写注释
'import/extensions': ['error', { js: 'nerver', vue: 'nerver', css: 'nerver' }], // 允许import后缀为.js的文件
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: [
'config',
'state', // for vuex state
],
},
],
},
};