@admc.com/eslintplugin-sn-test 3.6.2 → 3.8.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/.eslintrc.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "env": { "es2022": true, "node": true },
5
5
  "extends": "eslint:recommended",
6
6
  "parserOptions": { "ecmaVersion": "latest" },
7
- "ignorePatterns": ["goodScripts/**", "badScripts/**", "test/**"],
7
+ "ignorePatterns": ["*Scripts/**", "test/**"],
8
8
  "rules": {
9
9
  "camelcase": ["warn", { "properties": "never" }],
10
10
  "eqeqeq": "error",
@@ -0,0 +1,13 @@
1
+ dummy = function($scope) {
2
+ "use strict";
3
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
+ console.warn("UPDATE02");
5
+ console.warn("$scope", $scope);
6
+ console.info("Executing " + fName + " with this", this);
7
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
8
+ console.info(fName + " inputs", this.inputs);
9
+ console.info(fName + " data", this.data);
10
+ console.info(fName + " options", this.options);
11
+ $scope.pneu = "new string";
12
+ console.info("this", this);
13
+ };
@@ -1 +1,13 @@
1
- if (gs.getUserName() === null) throw new Error("bad");
1
+ function($scope) {
2
+ "use strict";
3
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
+ console.warn("UPDATE02");
5
+ console.warn("$scope", $scope);
6
+ console.info("Executing " + fName + " with this", this);
7
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
8
+ console.info(fName + " inputs", this.inputs);
9
+ gs.info(fName + " data", this.data);
10
+ console.info(fName + " options", this.options);
11
+ $scope.pneu = "new string";
12
+ console.info("this", this);
13
+ }
@@ -0,0 +1,13 @@
1
+ function dummy($scope) {
2
+ "use strict";
3
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
+ console.warn("UPDATE02");
5
+ console.warn("$scope", $scope);
6
+ console.info("Executing " + fName + " with this", this);
7
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
8
+ console.info(fName + " inputs", this.inputs);
9
+ console.info(fName + " data", this.data);
10
+ console.info(fName + " options", this.options);
11
+ $scope.pneu = "new string";
12
+ console.info("this", this);
13
+ }
@@ -0,0 +1,9 @@
1
+ api.controller=function() {
2
+ // Doing this instead of eslint-disable notation since that notation would conflict with wrapping:
3
+ "use strict";
4
+ // This is as close as can get to OOTB while not failing more basic rules that we don't
5
+ // want to test for here.
6
+ /* eslint-disable no-var,no-unused-vars */
7
+ /* widget controller */
8
+ var c = this;
9
+ };
@@ -0,0 +1,13 @@
1
+ function($scope) {
2
+ "use strict";
3
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
+ console.warn("UPDATE02");
5
+ console.warn("$scope", $scope);
6
+ console.info("Executing " + fName + " with this", this);
7
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
8
+ console.info(fName + " inputs", this.inputs);
9
+ console.info(fName + " data", this.data);
10
+ console.info(fName + " options", this.options);
11
+ $scope.pneu = "new string";
12
+ console.info("this", this);
13
+ }
@@ -0,0 +1,14 @@
1
+ console.info("helo");
2
+ function($scope) {
3
+ "use strict";
4
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
5
+ console.warn("UPDATE02");
6
+ console.warn("$scope", $scope);
7
+ console.info("Executing " + fName + " with this", this);
8
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
9
+ console.info(fName + " inputs", this.inputs);
10
+ console.info(fName + " data", this.data);
11
+ console.info(fName + " options", this.options);
12
+ $scope.pneu = "new string";
13
+ console.info("this", this);
14
+ }
@@ -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,11 +1,13 @@
1
- let v = "four";
2
- const dblr = v=>{'use strict'; return v+v;};
3
-
4
- api.onLoad = function($scope) {
1
+ function($scope) {
5
2
  "use strict";
6
- console.info('Running api.onLoad');
7
- $scope.thisRef = this;
8
- };
9
-
10
- v = dblr(v);
11
- console.info(window.name, v, jQuery("body").length, document.URL);
3
+ const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
+ console.warn("UPDATE02");
5
+ console.warn("$scope", $scope);
6
+ console.info("Executing " + fName + " with this", this);
7
+ this.thisVar = "I am here"; // To facilitate checking for this exact instance
8
+ console.info(fName + " inputs", this.inputs);
9
+ console.info(fName + " data", this.data);
10
+ console.info(fName + " options", this.options);
11
+ $scope.pneu = "new string";
12
+ console.info("this", this);
13
+ }
@@ -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" + input.datum);
6
+ }
7
+ })();
@@ -1,6 +1,6 @@
1
1
  (function() {
2
2
  if (input.datum) {
3
3
  data.datum = input.datum;
4
- gs.info("Set datum for client");
4
+ gs.info("Set datum for client" + input.datum);
5
5
  }
6
6
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "3.6.2",
3
+ "version": "3.8.0",
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
@@ -27,10 +27,7 @@
27
27
  "@admc.com/sn/no-init-emptystring": "error"
28
28
  },
29
29
  "overrides": [
30
- {
31
- "files": ["**/sys_ui_script/*/*.js"],
32
- "rules": { "@admc.com/sn/no-uiscript-curlyref": "error" }
33
- }, { // ES6 overrides
30
+ { // ES6 overrides
34
31
  "files": [ "**/@(noniso|iso)/*.js",
35
32
  "**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet)/all/*.js"], // eslint-disable-line max-len
36
33
  "rules": {
@@ -56,6 +53,15 @@
56
53
  "prefer-spread": "error",
57
54
  "prefer-template": "error"
58
55
  }
56
+ }, {
57
+ // Reverting eslint-plugin-sn exceptions back, because we overrode them generally above
58
+ // when raising warnings to errors.
59
+ "files":
60
+ ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link)/*/*.js"],
61
+ "rules": {
62
+ "prefer-template": "off",
63
+ "no-template-curly-in-string": "off"
64
+ }
59
65
  }, { // Overriding for ES12 IIFE scriptlets}
60
66
  "files": [
61
67
  "**/@(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