generated from xlzy520/uniapp-tailwind-uview-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
107 lines (107 loc) · 2.15 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// .eslintrc.js 文件内容, 此处是eslint的规则定义, 可自行修改,可参考eslint官网修改
module.exports = {
root: true,
extends: [
// 'eslint:recommended',
'plugin:vue/essential',
'airbnb-base'
],
parserOptions: {
ecmaVersion: 9,
ecmaFeatures: {
jsx: false,
},
sourceType: 'module',
},
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
plugins: [
'node',
'vue'
],
rules: {
'arrow-parens': 'off',
'no-tabs': 'off',
complexity: ['error', 10],
'global-require': 'off',
'handle-callback-err': [
'error',
'^(err|error)$'
],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'linebreak-style': 'off',
'no-catch-shadow': 'error',
'no-continue': 'off',
'no-div-regex': 'warn',
'no-else-return': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-shadow': 'off',
// enable console for this project
'no-console': 'off',
'no-multi-assign': 'off',
'no-underscore-dangle': 'off',
'node/no-deprecated-api': 'error',
'node/process-exit-as-throw': 'error',
'operator-linebreak': [
'error',
'after',
{
overrides: {
':': 'before',
'?': 'before',
},
}
],
'prefer-arrow-callback': 'off',
'prefer-destructuring': 'off',
'prefer-template': 'off',
'quote-props': [
1,
'as-needed',
{
unnecessary: true,
}
],
semi: [
'error',
'never'
],
camelcase: [
'error',
{
properties: 'never',
}
],
'func-names': ['error', 'as-needed'],
'comma-dangle': [
'error',
{
functions: 'never',
arrays: 'never',
imports: 'never',
exports: 'never',
objects: 'always-multiline',
}
],
},
globals: {
window: true,
document: true,
App: true,
Page: true,
Component: true,
Behavior: true,
wx: true,
worker: true,
getApp: true,
uni: true,
},
}