@admc.com/eslintplugin-sn-test 1.0.5 → 1.0.8

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 (49) hide show
  1. package/README.md +13 -4
  2. package/badScripts/global/sc_cat_item_producer/otherVar.js +1 -0
  3. package/badScripts/global/sys_processor/initEmptyString.js +5 -3
  4. package/badScripts/global/sys_script/{sane.js → es6console.js} +0 -0
  5. package/badScripts/global/sys_script/noIife.js +2 -0
  6. package/badScripts/global/sys_script/noIifeParams.js +2 -2
  7. package/badScripts/global/sys_script/wrongIifeParams.js +2 -2
  8. package/badScripts/global/sys_script_email/wrongIifeParams.js +3 -0
  9. package/badScripts/global/sys_security_acl/scopedLog.js +1 -0
  10. package/badScripts/global/sys_transform_script/noIife.js +2 -0
  11. package/badScripts/global/sys_ui_action/console.js +1 -0
  12. package/badScripts/global/sys_ui_action/scopedLog.js +1 -0
  13. package/badScripts/global/sys_web_service/noIifeParams.js +3 -0
  14. package/badScripts/global/sys_web_service/wrongIifeParams.js +5 -0
  15. package/badScripts/iso/sys_ui_action/gs.js +1 -0
  16. package/badScripts/iso/sys_ui_action/window.js +1 -0
  17. package/badScripts/iso/sys_ui_policy.script_true/window.js +1 -0
  18. package/badScripts/iso_globalaction/sys_ui_action/scopedLog.js +1 -0
  19. package/badScripts/iso_globalaction/sys_ui_action/window.js +1 -0
  20. package/badScripts/iso_scopedaction/sys_ui_action/globalLog.js +1 -0
  21. package/badScripts/iso_scopedaction/sys_ui_action/window.js +1 -0
  22. package/badScripts/noniso/sys_ui_action/gs.js +1 -0
  23. package/badScripts/noniso/sys_ui_policy.script_false/gs.js +1 -0
  24. package/badScripts/noniso_globalaction/sys_ui_action/scopedLog.js +1 -0
  25. package/badScripts/noniso_scopedaction/sys_ui_action/globalLog.js +1 -0
  26. package/badScripts/scoped/sys_ui_action/console.js +1 -0
  27. package/badScripts/scoped/sys_ui_action/globalLog.js +1 -0
  28. package/badScripts/scoped/sysevent_script_action/nonEventVar.js +1 -0
  29. package/goodScripts/global/sys_script/noIifeNoVar.js +1 -0
  30. package/goodScripts/global/sys_ui_action/good.js +1 -0
  31. package/goodScripts/global/sysevent_script_action/good.js +1 -0
  32. package/goodScripts/iso/sys_ui_action/good.js +1 -0
  33. package/goodScripts/iso/sys_ui_policy.script_true/console.js +1 -0
  34. package/goodScripts/iso/sys_ui_policy.script_true/onCondition.js +1 -0
  35. package/goodScripts/iso_globalaction/sys_ui_action/good.js +2 -0
  36. package/goodScripts/iso_scopedaction/sys_ui_action/good.js +2 -0
  37. package/goodScripts/noniso/sys_ui_action/good.js +1 -0
  38. package/goodScripts/noniso/sys_ui_policy.script_false/window.js +1 -0
  39. package/goodScripts/noniso_globalaction/sys_ui_action/good.js +2 -0
  40. package/goodScripts/noniso_scopedaction/sys_ui_action/good.js +2 -0
  41. package/goodScripts/scoped/sc_cat_item_producer/good.js +1 -0
  42. package/goodScripts/scoped/sys_processor/scopedLogging.js +6 -4
  43. package/goodScripts/scoped/sys_script_email/good.js +3 -0
  44. package/goodScripts/scoped/sys_security_acl/good.js +1 -0
  45. package/goodScripts/scoped/sys_transform_map/good.js +3 -0
  46. package/goodScripts/scoped/sys_ui_action/good.js +1 -0
  47. package/masterTest.js +1 -1
  48. package/package.json +2 -2
  49. package/badScripts/global/sys_script/noiife.js +0 -1
package/README.md CHANGED
@@ -1,17 +1,26 @@
1
- # Description
1
+ # eslint-plugin sn Tester
2
+
3
+ ## Description
2
4
  External tests for ESLint plugin @admc.com/eslint-plugin-sn
3
5
 
4
- # Installation
6
+ ## Installation
5
7
  ```
6
8
  npm i @admc.com/sn
7
9
  ```
8
10
 
9
- # Setup
11
+ ## Setup
10
12
  ```
11
13
  npm run setup
12
14
  ```
13
15
 
14
- # Execute tests
16
+ ## Execute tests
15
17
  ```
16
18
  npm test
17
19
  ```
20
+
21
+ ## Development
22
+ To develop tests for eslint-plugin-sn changes that aren't yet published, you can use the npm
23
+ link (non-global) link feature, but this has side-effects since the intermediate links is set up
24
+ at a shared location on your computer.
25
+ Less invasive is to just manually wipe the subdirectory node_modules/@admc.com/eslint-plugin-sn/
26
+ and replace it with a symlink (or copy) of the development eslint-plugin-sn project directory.
@@ -0,0 +1 @@
1
+ gs.log(otherVar, "src");
@@ -1,3 +1,5 @@
1
- var x = "";
2
- x = "changed";
3
- gs.log(x, 'src');
1
+ (function() {
2
+ var x = "";
3
+ x = "changed";
4
+ gs.log(x, 'src');
5
+ })(g_response, g_processor, g_request);
@@ -0,0 +1,2 @@
1
+ var v = 3;
2
+ gs.log(v, "blaine");
@@ -1,3 +1,3 @@
1
1
  (function() {
2
- console.log("This will fail", "blaine");
3
- }(); // Invocation params here is what is constrained
2
+ gs.log("This will fail", "blaine");
3
+ })(); // Invocation params here is what is constrained
@@ -1,3 +1,3 @@
1
1
  (function() {
2
- console.log("This will fail", "blaine");
3
- }(alpha, beta); // Invocation params here is what is constrained
2
+ gs.log("This will fail", "blaine");
3
+ })(previous, previous); // Invocation params here is what is constrained
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ gs.log("global log", "src");
3
+ })(current, template, email, email_action, event, gs);
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
@@ -0,0 +1,2 @@
1
+ var s = "message";
2
+ gs.log(s, "src");
@@ -0,0 +1 @@
1
+ console.info("client log");
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
@@ -0,0 +1,3 @@
1
+ var nuVar = 3;
2
+ gs.log(request.http.inputParam + " / " + nuVar, "src");
3
+ response.setStatus(200);
@@ -0,0 +1,5 @@
1
+ (function() {
2
+ var v = 3;
3
+ gs.log(request.http.inputParam + v, "src");
4
+ response.setStatus(200);
5
+ })(response, APCHandler);
@@ -0,0 +1 @@
1
+ if (gs.getUserName() === null) throw new Error("bad");
@@ -0,0 +1 @@
1
+ console.info(window.width);
@@ -0,0 +1 @@
1
+ console.info(window.width);
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
@@ -0,0 +1 @@
1
+ console.info(window.width);
@@ -0,0 +1 @@
1
+ gs.log("global log", "src");
@@ -0,0 +1 @@
1
+ console.info(window.width);
@@ -0,0 +1 @@
1
+ if (gs.getUserName() === null) throw new Error("bad");
@@ -0,0 +1 @@
1
+ console.info(gs.getUserName());
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
@@ -0,0 +1 @@
1
+ gs.log("global log", "src");
@@ -0,0 +1 @@
1
+ console.info("client log");
@@ -0,0 +1 @@
1
+ gs.log("global log", "src");
@@ -0,0 +1 @@
1
+ gs.info(otherVar);
@@ -0,0 +1 @@
1
+ gs.log("here without IIFE", "blaine");
@@ -0,0 +1 @@
1
+ gs.log("global script", "src");
@@ -0,0 +1 @@
1
+ gs.log(event, "src");
@@ -0,0 +1 @@
1
+ console.info("iso script");
@@ -0,0 +1 @@
1
+ console.info("client log");
@@ -0,0 +1 @@
1
+ function onCondition() { "use strict"; console.info("Running fn"); }
@@ -0,0 +1,2 @@
1
+ gs.log("global log", "src");
2
+ console.info("client log");
@@ -0,0 +1,2 @@
1
+ gs.info("scoped log");
2
+ console.info("client log");
@@ -0,0 +1 @@
1
+ console.info(window.height);
@@ -0,0 +1 @@
1
+ console.info(window.width);
@@ -0,0 +1,2 @@
1
+ gs.log("global", "src");
2
+ console.info(window.width);
@@ -0,0 +1,2 @@
1
+ gs.info("scoped log");
2
+ console.info(window.width);
@@ -0,0 +1 @@
1
+ gs.info(producer);
@@ -1,4 +1,6 @@
1
- gs.debug("Single-param");
2
- gs.info("Multi-{1} with {0} placeholders", 2, "param");
3
- var dynamicMsg = "Does not contain placeholders";
4
- gs.warn(dynamicMsg, 2, "param");
1
+ (function() {
2
+ gs.debug("Single-param");
3
+ gs.info("Multi-{1} with {0} placeholders", 2, "param");
4
+ var dynamicMsg = "Does not contain placeholders";
5
+ gs.warn(dynamicMsg, 2, "param");
6
+ })(g_processor, g_response, g_request);
@@ -0,0 +1,3 @@
1
+ (function(thing) {
2
+ gs.info(thing);
3
+ })(email, email_action, event, current, template);
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ gs.info("scopedl og");
3
+ })(source, target, isUpdate, map, log);
@@ -0,0 +1 @@
1
+ gs.info("scoped log");
package/masterTest.js CHANGED
@@ -5,7 +5,7 @@ if (!__filename.startsWith(process.cwd() + "/")) // eslint-disable-line prefer-
5
5
  const relTestPath = __filename.substring(process.cwd().length + 1);
6
6
  const path = require("path");
7
7
  const fs = require("fs");
8
- const ex = /^test[/](good|bad)[/](?:(\w+)[/])?(\w+[/]\w+)-test[.]js$/.exec(relTestPath);
8
+ const ex = /^test[/](good|bad)[/](?:(\w+)[/])?([\w.]+[/]\w+)-test[.]js$/.exec(relTestPath);
9
9
  if (!ex) throw new Error(`Bad test file path: ${relTestPath}`);
10
10
  const shouldSucceed = ex[1] === "good";
11
11
  const altscope = ex[2];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
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.0.6"
31
+ "@admc.com/eslint-plugin-sn": "^1.0.32"
32
32
  }
33
33
  }
@@ -1 +0,0 @@
1
- console.log("here without IIFE", "blaine");