@admc.com/eslintplugin-sn-test 3.5.1 → 3.6.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/bad1Scripts/all/sys_ui_script/unusedParams.js +4 -0
- package/bad1Scripts/all/sys_ux_data_broker_scriptlet/backticks.js +5 -0
- package/bad1Scripts/all/sys_ux_data_broker_scriptlet/tooManyParams.js +4 -0
- package/bad1Scripts/scoped-es12/sys_ux_data_broker_transform/tooManyParams.js +6 -0
- package/bad1Scripts/scoped-es5/sys_ux_data_broker_transform/let.js +5 -0
- package/goodScripts/all/sys_ux_client_script_include/arrowExtraParam.js +4 -0
- package/goodScripts/all/sys_ux_client_script_include/tradExtraParam.js +5 -0
- package/goodScripts/all/sys_ux_data_broker_scriptlet/good.js +4 -0
- package/goodScripts/scoped-es12/sys_ux_data_broker_transform/good.js +5 -0
- package/goodScripts/scoped-es5/sys_ux_data_broker_transform/good.js +4 -0
- package/package.json +1 -1
- package/sneslintrc.json +5 -2
- package/bad1Scripts/all/sys_ux_client_script/nonObjParam.js +0 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
function(iput, additional) {
|
|
2
|
+
if (!iput.propertyName) return {"error" : "missing property name"};
|
|
3
|
+
gs.info(`transformTst:brokertran requested prop '${iput.propertyName}'`);
|
|
4
|
+
gs.info(`transformTst:brokertran additional param '${additional}'`);
|
|
5
|
+
return `${gs.getProperty(iput.propertyName)}>`;
|
|
6
|
+
}
|
package/package.json
CHANGED
package/sneslintrc.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"extends": ["plugin:@admc.com/sn/servicenow"],
|
|
10
10
|
|
|
11
11
|
// Following are overrides which escalate warns to errors.
|
|
12
|
-
// Tests only work if the
|
|
12
|
+
// Tests only work if the level is error because we check only snLint/eslint return value,
|
|
13
13
|
// not the stdout or stderr.
|
|
14
14
|
"rules": {
|
|
15
15
|
"no-implied-eval": "error",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"rules": { "@admc.com/sn/no-uiscript-curlyref": "error" }
|
|
32
32
|
}, { // ES6 overrides
|
|
33
33
|
"files": [ "**/@(noniso|iso)/*.js",
|
|
34
|
-
"**/@(sys_ui_script|sys_script_validator|sp_widget.client_script)/all/*.js"],
|
|
34
|
+
"**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet)/all/*.js"], // eslint-disable-line max-len
|
|
35
35
|
"rules": {
|
|
36
36
|
"strict": ["error", "function"],
|
|
37
37
|
"prefer-arrow-callback": "error",
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
}, { // Condition scriptlets
|
|
69
69
|
"files": [ "**/*.condition/*/*.js"],
|
|
70
70
|
"rules": { "strict": "off", "semi": "off" }
|
|
71
|
+
}, { // NE sys_ux scripts don't need and can't use "use strict"
|
|
72
|
+
"files": [ "**/sys_ux_*/*/*.js"],
|
|
73
|
+
"rules": { "strict": "off" }
|
|
71
74
|
}
|
|
72
75
|
],
|
|
73
76
|
"settings": {
|