@admc.com/eslintplugin-sn-test 3.2.0 → 3.3.0
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/bad1Scripts/global/sys_ui_action.condition/es12cond.js +4 -0
- package/goodScripts/global/sysauto_script.condition/multiline.js +3 -0
- package/goodScripts/scoped-es12/sys_script/arrowIife.js +7 -0
- package/goodScripts/scoped-es12/sys_ui_action.condition/multiline.js +11 -0
- package/masterTest.js +3 -3
- package/package.json +1 -1
- package/sneslintrc.json +4 -1
package/masterTest.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* global it */
|
|
3
|
-
|
|
3
|
+
const path = require("path");
|
|
4
|
+
if (!__filename.startsWith(process.cwd() + path.sep)) // eslint-disable-line prefer-template
|
|
4
5
|
throw new Error("You must execute these tests from the package base directory");
|
|
5
6
|
const relTestPath = __filename.substring(process.cwd().length + 1);
|
|
6
|
-
const path = require("path");
|
|
7
7
|
const fs = require("fs");
|
|
8
8
|
const ex = // eslint-disable-next-line max-len
|
|
9
|
-
/^test[
|
|
9
|
+
/^test[/\\](good|bad1|bad2|badSys)[/\\](?:([\w-]+)[/\\])?([\w.-]+[/\\][\w-]+)-test[.]js$/.exec(relTestPath);
|
|
10
10
|
if (!ex) throw new Error(`Bad test file path: ${relTestPath}`);
|
|
11
11
|
let expectExitVal;
|
|
12
12
|
switch (ex[1]) {
|
package/package.json
CHANGED
package/sneslintrc.json
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"no-var": "error",
|
|
52
52
|
"prefer-template": "error"
|
|
53
53
|
}
|
|
54
|
-
}, { //
|
|
54
|
+
}, { // Overriding for ES12 IIFE scriptlets}
|
|
55
55
|
"files": [
|
|
56
56
|
"**/@(sys_script|sys_ws_operation|sys_web_service|sys_processor|sys_script_email|sys_transform_map|sys_transform_script|sp_widget.script|sys_ui_page.processing_script)/scoped-es12/*.js", // eslint-disable-line max-len
|
|
57
57
|
"**/sys_ui_action/@(iso|noniso)_scoped-es12/*.js"
|
|
@@ -65,6 +65,9 @@
|
|
|
65
65
|
"@admc.com/sn/log-global-2-args": "error",
|
|
66
66
|
"@admc.com/sn/no-log-scoped": "error"
|
|
67
67
|
}
|
|
68
|
+
}, { // Condition scriptlets
|
|
69
|
+
"files": [ "**/*.condition/*/*.js"],
|
|
70
|
+
"rules": { "strict": "off", "semi": "off" }
|
|
68
71
|
}
|
|
69
72
|
],
|
|
70
73
|
"settings": {
|