@admc.com/eslintplugin-sn-test 3.8.0 → 3.9.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.
@@ -1,4 +1,4 @@
1
- function dummy($scope) {
1
+ function _unused($scope) {
2
2
  "use strict";
3
3
  const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
4
  console.warn("UPDATE02");
@@ -0,0 +1,5 @@
1
+ (scope) => {
2
+ "use strict";
3
+ const wid = scope.widget.id;
4
+ console.warn(`${wid} UPDATE02`);
5
+ }
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line max-len
2
+ console.info(`The built-in variables are g_list ${g_list}, g_fieldName (${g_fieldName}), g_sysId ${g_sysId}`);
@@ -1,5 +1,8 @@
1
- dummy = function($scope) {
1
+ _unused = function($scope) {
2
+ /* I had to put this script under bad2Scripts instead of bad1Scripts to accommodate an
3
+ * ESLint bug where varsIgnorePatterns are sometimes not honored, including for "_unused". */
2
4
  "use strict";
5
+ /* global _unused:writable */
3
6
  const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
4
7
  console.warn("UPDATE02");
5
8
  console.warn("$scope", $scope);
@@ -0,0 +1,8 @@
1
+ api.controller=function() {
2
+ // Have to satisfy "use strict" or would have to complicate eslintplugin-sn-test design to
3
+ // allow arbitrarily-specified number of failures, or at least add support for 3 failures.
4
+ // Doing this instead of eslint-disable notation since that notation would conflict with wrapping:
5
+ "use strict";
6
+ /* widget controller */
7
+ var c = this;
8
+ };
@@ -0,0 +1,4 @@
1
+ function link(scope, element, attrs, controller) { // eslint-disable-line no-unused-vars
2
+ "use strict";
3
+
4
+ }
@@ -0,0 +1,9 @@
1
+ (scope) => {
2
+ "use strict";
3
+ const fName = "splink/" + 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
+ scope.pneu = "new string";
9
+ }
@@ -0,0 +1,2 @@
1
+ console.info("The built-in variables are g_list " + g_list + ", g_fieldName ("
2
+ + g_fieldName + "), g_sysId " + g_sysId);
@@ -0,0 +1,7 @@
1
+ (() => {
2
+ "use strict";
3
+ if (input.datum) {
4
+ data.datum = input.datum;
5
+ gs.info("Set datum for client" + input.datum);
6
+ }
7
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "3.8.0",
3
+ "version": "3.9.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
@@ -29,7 +29,7 @@
29
29
  "overrides": [
30
30
  { // ES6 overrides
31
31
  "files": [ "**/@(noniso|iso)/*.js",
32
- "**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet)/all/*.js"], // eslint-disable-line max-len
32
+ "**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet|sp_widget.link|sys_ui_context_menu)/all/*.js"], // eslint-disable-line max-len
33
33
  "rules": {
34
34
  "strict": ["error", "function"],
35
35
  "prefer-arrow-callback": "error",
@@ -57,7 +57,7 @@
57
57
  // Reverting eslint-plugin-sn exceptions back, because we overrode them generally above
58
58
  // when raising warnings to errors.
59
59
  "files":
60
- ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link)/*/*.js"],
60
+ ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sp_widget.link|sys_ui_context_menu)/*/*.js"],
61
61
  "rules": {
62
62
  "prefer-template": "off",
63
63
  "no-template-curly-in-string": "off"