-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.eslintrc.js
91 lines (87 loc) · 1.91 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
module.exports = {
extends: ["@s4p/eslint-config"],
env: {
// 你的环境变量(包含多个预定义的全局变量)
// browser: true,
// node: true,
// mocha: true,
// jest: true,
// jquery: true
},
globals: {
// 引入 android class
Settings: false,
Uri: false,
Intent: false,
Context: false,
AudioManager: false,
View: false,
Rect: false,
Point: false,
UiObject: false,
UiCollection: false,
MatchTemplateOptions: false,
UiSelector: false,
EventEmitter: false,
// autojs 自带的
dialogs: false,
auto: false,
ui: false,
threads: false,
events: false,
app: false,
back: false,
openAppSetting: false,
images: false,
device: false,
open: false,
press: false,
click: false,
swipe: false,
gesture: false,
home: false,
context: false,
importClass: false,
android: false,
sleep: false,
currentPackage: false,
currentActivity: false,
setClip: false,
getClip: false,
toast: false,
toastLog: false,
waitForActivity: false,
waitForPackage: false,
exit: false,
random: false,
text: false,
textContains: false,
textStartsWith: false,
textEndsWith: false,
textMatches: false,
desc: false,
descContains: false,
descStartsWith: false,
descEndsWith: false,
descMatches: false,
id: false,
idContains: false,
idStartsWith: false,
idEndsWith: false,
idMatches: false,
className: false,
classNameContains: false,
classNameStartsWith: false,
classNameEndsWith: false,
classNameMatches: false,
http: false,
files: false,
engines: false,
// 你的全局变量(设置为 false 表示它不允许被重新赋值)
},
rules: {
// 自定义你的规则
"@typescript-eslint/unified-signatures": ["off"],
"max-params": ["error", { max: 5 }],
},
};