forked from twenis/mp_release_platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
82 lines (82 loc) · 1.65 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
module.exports = {
root: true,
env: {
browser: true,
es2020: true,
},
extends: [
'airbnb-base',
'plugin:vue/essential',
],
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 11,
sourceType: 'module',
},
plugins: [
'vue',
],
globals: {
__CLIENT__: true,
__SERVER__: true,
__DEVELOPMENT__: true,
__PRODUCTION__: true,
wx: true,
},
rules: {
semi: [2, 'never'],
'comma-dangle': [1, 'always-multiline'],
'arrow-parens': 'off',
'no-underscore-dangle': 'off',
'arrow-body-style': 'off',
'consistent-return': 'off',
'array-callback-return': 'off',
'max-len': 'off',
'max-lines': 'off',
'no-console': 'off',
'no-plusplus': 'off',
'no-mixed-operators': 'off',
'class-methods-use-this': 'off',
'no-else-return': 'off',
'default-case': 'off',
'no-new': 'off',
'no-restricted-syntax': 'off',
'no-continue': 'off',
'no-return-assign': [
'off',
'always',
],
// 禁止无用的表达式
'no-unused-expressions': [
'off',
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
},
],
'global-require': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'always',
asyncArrow: 'always',
},
],
'import/extensions': ['error', 'always', {
js: 'never',
json: 'never',
scss: 'never',
css: 'never',
vue: 'never',
}],
},
settings: {
'import/resolver': {
webpack: {
config: './build/webpack.client.config.js',
},
},
},
}