crabatool 1.0.705 → 1.0.706
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +12 -2
- package/package.json +2 -1
- package/tool/checkjs.js +3 -0
package/.eslintrc.json
CHANGED
|
@@ -15,7 +15,17 @@
|
|
|
15
15
|
"semi": "off",
|
|
16
16
|
"no-redeclare": "off",
|
|
17
17
|
//"no-unused-vars": "off",
|
|
18
|
-
"missingSemi": "off"
|
|
18
|
+
"missingSemi": "off",
|
|
19
|
+
"comma-dangle": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"arrays": "ignore", // 或者根据你的需求设置"always"或"never"
|
|
23
|
+
"objects": "ignore", // 同上
|
|
24
|
+
"imports": "ignore", // 同上
|
|
25
|
+
"exports": "ignore", // 同上
|
|
26
|
+
"functions": "never" // 针对函数参数(包括调用)禁止拖尾逗号
|
|
27
|
+
}
|
|
28
|
+
]
|
|
19
29
|
},
|
|
20
30
|
"globals": {
|
|
21
31
|
"Sys": "readonly",
|
|
@@ -87,6 +97,6 @@
|
|
|
87
97
|
"wps": "readonly",
|
|
88
98
|
"dw": "readonly",
|
|
89
99
|
"QRCode": "readonly",
|
|
90
|
-
"AMap":"readonly"
|
|
100
|
+
"AMap": "readonly"
|
|
91
101
|
}
|
|
92
102
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crabatool",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.706",
|
|
4
4
|
"description": "crabatool",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"crabaNgp": "node run.js -mergejs -hidejspath true -targetPath F:/CarpaNET_NEW/src/Carpa.Web/js/crabaNgp -inNames initMs.js,businessControl.js -outName F:/CarpaMS/src/js/crabaNgp.js",
|
|
30
30
|
"mergeJs2": "node run.js -mergejs -targetPath -inNames F:/CarpaNET_NEW/src/Carpa.Web/js/craba.js,F:/CarpaNET_NEW/src/Carpa.Web/js/controls.js -outName F:/a.js -ignorecompress true",
|
|
31
31
|
"checkcrabaevery": "node ./test/test.js -checkjs -webPath F:/crabaevery/www -modName crabaevery -Debug false",
|
|
32
|
+
"checkbasicweb": "node ./test/test.js -checkjs -webPath F:/basicweb/www -modName basicweb -Debug false",
|
|
32
33
|
"biconfont": "node ./test/test.js -iconfont -zipPath F:/crabaevery/www/biconfont -fontPath F:/crabaevery/www/skins/bicon -prefix .bicon- -fontName biconfont",
|
|
33
34
|
"aiconfont": "node ./test/test.js -iconfont -zipPath F:/crabaevery/www/iconfont -fontPath F:/CarpaNET_NEW/src/Carpa.Web/skins -prefix .aicon- -fontName iconfont",
|
|
34
35
|
"makeHash": "node run.js -makeHash -webPath ./test/ -modName craba -files http://crabadoc.ca.com/js/utils/utils.js,F:/newcrabadoc/www/js/utils/utils.js,./test/test.js,./test/beefun.js,https://s5.vip.wpscdn.cn/web-libs/2t/js/userinfo-collect/1.0.3/vas2t-userinfo-collect.min.js?a=1 -outJson ./hash.json -hashName sha384",
|
package/tool/checkjs.js
CHANGED
|
@@ -130,6 +130,9 @@ module.exports.start = async function() {
|
|
|
130
130
|
list = undefList;
|
|
131
131
|
} else if (item.ruleId.includes('native-ie')) {
|
|
132
132
|
list = ieList;
|
|
133
|
+
} else if (item.ruleId.includes('comma-dangle')) {
|
|
134
|
+
list = ieList;
|
|
135
|
+
item.message += '多余的逗号';
|
|
133
136
|
} else if (item.ruleId.indexOf('no-unused-vars') > -1) {
|
|
134
137
|
if (item.message && (item.message.includes("'sender'") || item.message.includes("'eventArgs'")) || item.message.includes("'args'")) {
|
|
135
138
|
return;
|