-
Notifications
You must be signed in to change notification settings - Fork 381
/
.eslintrc.js
66 lines (66 loc) · 1.61 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
module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module'
},
extends: 'standard',
plugins: ['html', 'jest'],
globals: {
wx: 'readonly',
my: 'readonly',
swan: 'readonly',
qq: 'readonly',
tt: 'readonly',
jd: 'readonly',
qa: 'readonly',
dd: 'readonly',
Component: 'readonly',
Page: 'readonly',
App: 'readonly',
Mixin: 'readonly',
__mpx_mode__: 'readonly',
__mpx_env__: 'readonly',
__mpx_dynamic_runtime__: 'readonly',
getRegExp: 'readonly',
getCurrentPages: 'readonly'
},
rules: {
'no-cond-assign': 0,
camelcase: 0,
indent: 0,
'symbol-description': 0
},
env: {
'jest/globals': true,
browser: true
},
overrides: [
{
files: ['**/*.tsx', '**/*.ts'],
parser: '@typescript-eslint/parser',
extends: [
'standard',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'no-use-before-define': 0,
'@typescript-eslint/triple-slash-reference': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-non-null-assertion': 0,
camelcase: 0
}
}, {
files: ['packages/webpack-plugin/lib/runtime/components/react/**/*.{js,jsx,ts,tsx}'],
plugins: ['react-hooks'],
rules: {
'react-hooks/rules-of-hooks': 'error'
}
}
]
}