@admc.com/eslintplugin-sn-test 3.11.0 → 3.11.2

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.
Files changed (27) hide show
  1. package/bad1Scripts/all/sys_script_validator/interpolateStr.js +5 -0
  2. package/bad1Scripts/iso/catalog_script_client/interpolateStr.js +1 -0
  3. package/bad1Scripts/scoped-es12/sysevent_in_email_action/ootbBoilerplate.js +1 -1
  4. package/bad1Scripts/scoped-es5/sp_widget.script/globalLog.js +1 -0
  5. package/bad1Scripts/scoped-es5/sys_script/brCurrentUpdate.js +1 -0
  6. package/bad1Scripts/sss_scoped-es12/sys_variable_value/noIife.js +2 -0
  7. package/goodScripts/all/sys_script_validator/noInterp.js +5 -0
  8. package/goodScripts/iso/catalog_script_client/noInterp.js +1 -0
  9. package/goodScripts/scoped-es12/sp_widget.script/noInterp.js +7 -0
  10. package/goodScripts/scoped-es12/sys_atf_step_config.step_execution_generator/nice.js +2 -2
  11. package/goodScripts/scoped-es12/sysevent_in_email_action/cleanedBoilerplate.js +1 -1
  12. package/goodScripts/scoped-es5/sp_widget.script/good.js +1 -0
  13. package/goodScripts/scoped-es5/sys_processor/scopedLogging.js +1 -0
  14. package/goodScripts/scoped-es5/sys_script/glideDateDV.js +1 -0
  15. package/goodScripts/scoped-es5/sys_script/good.js +1 -0
  16. package/goodScripts/scoped-es5/sys_script_email/good.js +1 -0
  17. package/goodScripts/scoped-es5/sys_transform_map/good.js +1 -0
  18. package/goodScripts/sin_scoped-es12/sys_variable_value/sysid.js +3 -0
  19. package/goodScripts/sss_scoped-es12/sys_variable_value/safeNoIife.js +20 -0
  20. package/goodScripts/sss_scoped-es12/sys_variable_value/sysid.js +24 -0
  21. package/package.json +1 -1
  22. package/sneslintrc.json +14 -9
  23. /package/bad2Scripts/{atf_rsss_script-global → sss_global}/sys_variable_value/ootbBoilerplate.js +0 -0
  24. /package/goodScripts/{sys_script_validator → all/sys_script_validator}/good.js +0 -0
  25. /package/goodScripts/{atf_rsss_script-global → sss_global}/sys_variable_value/cleanedBoilerplate.js +0 -0
  26. /package/goodScripts/{atf_rsss_script-es12 → sss_scoped-es12}/sys_variable_value/cleanedBoilerplate.js +0 -0
  27. /package/goodScripts/{atf_rsss_script-es12 → sss_scoped-es12}/sys_variable_value/useGlobals.js +0 -0
@@ -0,0 +1,5 @@
1
+ function validate() {
2
+ "use strict";
3
+ const msg = "client log";
4
+ console.info(`Message: ${msg}`);
5
+ }
@@ -0,0 +1 @@
1
+ console.info(`TABLE: ${g_form.getTableName()}`);
@@ -1,5 +1,5 @@
1
- "use strict";
2
1
  (function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
2
+ "use strict";
3
3
 
4
4
  // Implement email action here
5
5
  logger.info(`Input params (${current}) (${event}) (${email}) (${classifier})`);
@@ -1,4 +1,5 @@
1
1
  (function() {
2
+ "use strict";
2
3
  if (input.datum) {
3
4
  data.datum = input.datum;
4
5
  gs.log("Set datum for client", "src");
@@ -1,3 +1,4 @@
1
1
  (function() {
2
+ "use strict";
2
3
  if (!current.update("update notation")) throw new Error("update failed");
3
4
  })(previous, current);
@@ -0,0 +1,2 @@
1
+ const aStr = "thing";
2
+ gs.info(aStr);
@@ -0,0 +1,5 @@
1
+ function validate() {
2
+ "use strict";
3
+ const msg = "client log";
4
+ console.info("Message: " + msg);
5
+ }
@@ -0,0 +1 @@
1
+ console.info("TABLE: " + g_form.getTableName());
@@ -0,0 +1,7 @@
1
+ (function() {
2
+ "use strict";
3
+ if (input.datum) {
4
+ data.datum = input.datum;
5
+ gs.info("Set datum for client to (" + input.data + ')');
6
+ }
7
+ })();
@@ -1,4 +1,4 @@
1
- "use strict";
2
- (() => { // eslint-disable-next-line array-callback-return
1
+ (() => {
2
+ "use strict"; // eslint-disable-next-line array-callback-return
3
3
  ["u_a", "u_b", "u_c"].forEach(n => outputs[n] = inputs[n]);
4
4
  })(inputs, outputs, stepResult, timeout);
@@ -1,4 +1,4 @@
1
- "use strict";
2
1
  (function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
2
+ "use strict";
3
3
  logger.info(`Input params (${current}) (${event}) (${email}) (${classifier})`);
4
4
  })(current, event, email, logger, classifier);
@@ -1,4 +1,5 @@
1
1
  (function() {
2
+ "use strict";
2
3
  if (input.datum) {
3
4
  data.datum = input.datum;
4
5
  gs.info("Set datum for client" + input.datum);
@@ -1,4 +1,5 @@
1
1
  (function() {
2
+ "use strict";
2
3
  gs.debug("Single-param");
3
4
  gs.info("Multi-{1} with {0} placeholders", 2, "param");
4
5
  var dynamicMsg = "Does not contain placeholders";
@@ -1,4 +1,5 @@
1
1
  (function() {
2
+ "use strict";
2
3
  // This is the supported replacement for obsoleted gs.now() function:
3
4
  gs.info("Today in UTF is " + new GlideDate().getDisplayValue());
4
5
  })(previous, current);
@@ -1,4 +1,5 @@
1
1
  (function() {
2
+ "use strict";
2
3
  // Test availability of scoped vars from the different component lists:
3
4
  gs.info(new sn_ws_err.NotAcceptableError("fake err")); // coreServerObjects.txt
4
5
  gs.info(Object.keys(new sn_codesearch.CodeSearch()).length); // SIScopes
@@ -1,3 +1,4 @@
1
1
  (function(thing) {
2
+ "use strict";
2
3
  gs.info(thing);
3
4
  })(email, email_action, event, current, template);
@@ -1,3 +1,4 @@
1
1
  (function() {
2
+ "use strict";
2
3
  gs.info("scoped log");
3
4
  })(source, target, map, log, action==="update");
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const aSysId = "123456789012345678901234567890ab";
3
+ gs.info(aSysId);
@@ -0,0 +1,20 @@
1
+ gs.info(`Provided functions:
2
+ ${jasmine}
3
+ ${describe}
4
+ ${xdescribe}
5
+ ${fdescribe}
6
+ ${it}
7
+ ${xit}
8
+ ${fit}
9
+ ${beforeEach}
10
+ ${beforeAll}
11
+ ${afterEach}
12
+ ${afterAll}
13
+ ${expect}
14
+ ${fail}
15
+ ${pending}
16
+ ${spyOn}
17
+ + input Params:
18
+ ${steps}
19
+ ${params}
20
+ `);
@@ -0,0 +1,24 @@
1
+ ((steps, params) => {
2
+ "use strict";
3
+ gs.info(`Provided functions:
4
+ ${jasmine}
5
+ ${describe}
6
+ ${xdescribe}
7
+ ${fdescribe}
8
+ ${it}
9
+ ${xit}
10
+ ${fit}
11
+ ${beforeEach}
12
+ ${beforeAll}
13
+ ${afterEach}
14
+ ${afterAll}
15
+ ${expect}
16
+ ${fail}
17
+ ${pending}
18
+ ${spyOn}
19
+ + input Params:
20
+ ${steps}
21
+ ${params}
22
+ `);
23
+ gs.info("123456789012345678901234567890ab");
24
+ })(outputs, steps, params, stepResult, assertEqual);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "3.11.0",
3
+ "version": "3.11.2",
4
4
  "description": "External tests for ESLint plugin @admc.com/eslint-plugin-sn",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive",
package/sneslintrc.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@admc.com/sn/no-client-gr": "error"
44
44
  }
45
45
  }, { // ES 12 overrides
46
- "files": [ "**/scoped-es12/*.js" ],
46
+ "files": [ "**/scoped-es12/*.js", "**/sys_variable_value/s*_scoped-es12/*.js" ],
47
47
  "rules": {
48
48
  "strict": ["error", "global"],
49
49
  "prefer-arrow-callback": "error",
@@ -54,19 +54,24 @@
54
54
  "prefer-spread": "error",
55
55
  "prefer-template": "error"
56
56
  }
57
+ }, { // Same reason as the warn-to-error overides above, but rule applies only to some scripts.
58
+ "files": [ "**/catalog_script_client/*/*.js" ],
59
+ "rules": { "@admc.com/sn/no-backtick-curlyref": "error" }
57
60
  }, {
58
61
  // Reverting eslint-plugin-sn exceptions back, because we overrode them generally above
59
62
  // when raising warnings to errors.
60
63
  "files":
61
- ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sp_widget.link|sys_ui_context_menu)/*/*.js"],
62
- "rules": {
63
- "prefer-template": "off",
64
- "no-template-curly-in-string": "off"
65
- }
66
- }, { // Overriding for ES12 IIFE scriptlets}
64
+ ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sys_ui_context_menu)/*/*.js"],
65
+ "rules": { "no-template-curly-in-string": "off" }
66
+ }, {
67
+ "files":
68
+ ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sys_ui_context_menu|sys_script_validator|catalog_script_client)/*/*.js"],
69
+ "rules": { "prefer-template": "off" }
70
+ }, { // Overriding for ES5+ IIFE scriptlets}
67
71
  "files": [
68
- "**/@(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
69
- "**/sys_ui_action/@(iso|noniso)_scoped-es12/*.js"
72
+ "**/@(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|sysevent_in_email_action|sys_atf_step_config.step_execution_generator)/scoped-es*/*.js", // eslint-disable-line max-len
73
+ "**/sys_ui_action.script/@(iso|noniso)_scoped-es*/*.js",
74
+ "**/sys_variable_value/sss_scoped-es*/*.js"
70
75
  ],
71
76
  "rules": { "strict": ["error", "function"] }
72
77
  }, { // Custom table and scope