-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy path.eslintrc.js
40 lines (38 loc) · 877 Bytes
/
.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,
extends: ['alloy', 'alloy/vue', 'alloy/typescript'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
js: '@babel/eslint-parser',
jsx: '@babel/eslint-parser',
ts: '@typescript-eslint/parser',
tsx: '@typescript-eslint/parser',
// Leave the template parser unspecified, so that it could be determined by `<script lang="...">`
},
},
env: {
browser: true,
node: true,
},
globals: {
uni: true,
wx: true,
},
rules: {
// 自定义你的规则
'no-console': 'off',
// js 和 ts 的规则重合
'no-undef': 'off',
// @typescript-eslint
'@typescript-eslint/prefer-optional-chain': 'off',
// vue
'vue/no-duplicate-attributes': [
'error',
{
allowCoexistClass: true,
allowCoexistStyle: true,
},
],
},
};