-
Notifications
You must be signed in to change notification settings - Fork 43
/
.eslintrc.js
40 lines (40 loc) · 1.25 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
module.exports = {
root: true,
env: {
node: true,
},
plugins: ['vue'],
extends: ['plugin:vue/essential', '@vue/airbnb'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'import/extensions': 0, // import不需要写文件扩展名
'import/no-unresolved': 0,
// 'import/no-duplicates': 0,
'no-underscore-dangle': 0, // 无下划线
camelcase: 0, // 变量可以用下划线
semi: ['error', 'never'], // 无分号
'no-extra-semi': 0, // 和prettier冲突
'no-plusplus': 0, // 禁止使用++,--
// 'no-tabs': [o],
'guard-for-in': 0,
'max-len': ['error', { code: 200 }],
'no-restricted-syntax': 0,
'import/no-extraneous-dependencies': ['error', { devDependencies: ['script/**/*.js'] }],
'no-restricted-syntax': 0,
'class-methods-use-this': 'off',
'consistent-return': 'off',
'arrow-parens': ['error', 'as-needed'],
'object-curly-newline': [
'error',
{
ImportDeclaration: 'never',
},
],
'comma-dangle': ['error', 'only-multiline'],
'no-param-reassign': ['error', { props: false }],
},
parserOptions: {
parser: 'babel-eslint',
},
}