@admc.com/eslintplugin-sn-test 1.0.9 → 1.1.1
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/badScripts/iso/sys_ui_action/actionVar.js +1 -0
- package/badScripts/noniso/sys_ui_action/actionVar.js +1 -0
- package/goodScripts/custom_alt/custom_table/good.js +1 -0
- package/goodScripts/global/sys_ui_action/actionVar.js +1 -0
- package/goodScripts/iso_scopedaction/sys_ui_action/actionVar.js +1 -0
- package/goodScripts/scoped/sys_security_acl/good.js +1 -1
- package/goodScripts/scoped/sys_transform_entry/good.js +1 -0
- package/goodScripts/sys_ui_script/good.js +2 -1
- package/masterTest.js +2 -2
- package/package.json +2 -2
- package/sneslintrc.json +27 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.info(action.getGlideURI());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.info(action.getGlideURI());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gs.log("Helo world", "src");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gs.log(action.getGlideURI(), "src");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gs.info(action.getGlideURI());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
answer = true;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer = true;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const msg = "a ok";
|
|
2
|
+
console.info(msg + " now");
|
package/masterTest.js
CHANGED
|
@@ -14,7 +14,7 @@ const tableBase = ex[3];
|
|
|
14
14
|
const scriptPath = path.join(`${ex[1]}Scripts`, `${altscope?(altscope+"/"):""}${tableBase}.js`);
|
|
15
15
|
if (!fs.existsSync(scriptPath)) throw new Error(`Script file missing: ${scriptPath}`);
|
|
16
16
|
if (!fs.statSync(scriptPath).isFile()) throw new Error(`Script is not a file: ${scriptPath}`);
|
|
17
|
-
const params = [ "node_modules/.bin/snLint", scriptPath ];
|
|
17
|
+
const params = [ "node_modules/.bin/snLint", scriptPath, "-c" ];
|
|
18
18
|
if (altscope) params.splice(1, 0, "-a", altscope);
|
|
19
19
|
if (process.env.DEBUG) {
|
|
20
20
|
params.splice(1, 0, "-d");
|
|
@@ -25,6 +25,6 @@ const childProcess = require("child_process").
|
|
|
25
25
|
|
|
26
26
|
it(altscope ? `${tableBase} | ${altscope}` : tableBase, () => {
|
|
27
27
|
if (shouldSucceed && childProcess.status !== 0
|
|
28
|
-
|| !shouldSucceed && childProcess.status
|
|
28
|
+
|| !shouldSucceed && childProcess.status !== 1)
|
|
29
29
|
throw new Error(`Failed with code ${childProcess.status}`);
|
|
30
30
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admc.com/eslintplugin-sn-test",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "External tests for ESLint plugin @admc.com/eslint-plugin-sn",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "mocha --recursive",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"mocha": "^10.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@admc.com/eslint-plugin-sn": "^1.
|
|
31
|
+
"@admc.com/eslint-plugin-sn": "^1.1.2"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/sneslintrc.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"no-array-constructor": "error",
|
|
18
18
|
"max-depth": "error",
|
|
19
19
|
"dot-notation": "error",
|
|
20
|
-
"camelcase": ["error", { "properties": "never" }],
|
|
20
|
+
"camelcase": ["error", { "properties": "never", "ignoreGlobals": true }],
|
|
21
21
|
"no-template-curly-in-string": "error",
|
|
22
22
|
"eqeqeq": "error",
|
|
23
23
|
"semi": "error",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"overrides": [
|
|
29
29
|
{
|
|
30
|
-
"files": [
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
30
|
+
"files": [
|
|
31
|
+
"**//@(global|scoped)/*.js",
|
|
32
|
+
"**/sys_ui_action/@(iso|noniso)_@(global|scoped)action/*.js"
|
|
33
|
+
]
|
|
34
34
|
},{ // ES6 overrides
|
|
35
|
-
"files": ["**/@(
|
|
35
|
+
"files": [ "**/@(noniso|iso)/*.js" ],
|
|
36
36
|
"rules": {
|
|
37
37
|
"strict": ["error", "safe"],
|
|
38
38
|
"prefer-arrow-callback": "error",
|
|
@@ -40,7 +40,27 @@
|
|
|
40
40
|
"no-useless-rename": "error",
|
|
41
41
|
"no-var": "error",
|
|
42
42
|
"prefer-template": "error"
|
|
43
|
+
},
|
|
44
|
+
"files": [ "**/sys_ui_script/*.js" ],
|
|
45
|
+
"rules": {
|
|
46
|
+
"strict": ["error", "safe"],
|
|
47
|
+
"prefer-arrow-callback": "error",
|
|
48
|
+
"object-shorthand": "error",
|
|
49
|
+
"no-useless-rename": "error",
|
|
50
|
+
"no-var": "error"
|
|
43
51
|
}
|
|
52
|
+
}, { // Custom table and scope
|
|
53
|
+
"files": [ "**/custom_table/custom_alt/*.js" ],
|
|
54
|
+
"env": {"@admc.com/sn/sn_server_global": true },
|
|
55
|
+
"rules": {
|
|
56
|
+
"@admc.com/sn/invalid-table-altscope": "off",
|
|
57
|
+
"@admc.com/sn/log-global-2-args": "error",
|
|
58
|
+
"@admc.com/sn/no-log-scoped": "error"
|
|
59
|
+
}
|
|
44
60
|
}
|
|
45
|
-
]
|
|
61
|
+
],
|
|
62
|
+
"settings": {
|
|
63
|
+
"customTables": ["custom_table"],
|
|
64
|
+
"customAlts": ["custom_alt"]
|
|
65
|
+
}
|
|
46
66
|
}
|