@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.
@@ -0,0 +1,4 @@
1
+ (function(unused, good) {
2
+ 'use strict';
3
+ console.info(good);
4
+ })("badly", "goodly");
@@ -0,0 +1,5 @@
1
+ function(iput) {
2
+ if (!iput.propertyName) return {"error" : "missing property name"};
3
+ gs.info(`getCappedProp:brokerscr input (${iput.propertyName})`);
4
+ return "Z" + (iput.propertyName + iput.propertyName).toUpperCase();
5
+
@@ -0,0 +1,4 @@
1
+ function(iput, other) {
2
+ if (!iput.propertyName) return {"error" : "missing property name"};
3
+ return (iput.propertyName + other).toUpperCase();
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
+ }
@@ -0,0 +1,5 @@
1
+ function(iput) {
2
+ if (!iput.pattern) return {"error" : "missing property pattern"};
3
+ let x = 3;
4
+ return 45;
5
+ }
@@ -0,0 +1,4 @@
1
+ ({a, b}, c, d) => {
2
+ console.info(`Something about ${a} and ${b} and ${c} and ${d}`);
3
+ }
4
+ /* Tail comment */
@@ -0,0 +1,5 @@
1
+ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "fx" }] */
2
+ function fx({a, b}, c) {
3
+ console.info(`Something about ${a} and ${b} and ${c}`);
4
+ }
5
+ /* Tail comment */
@@ -0,0 +1,4 @@
1
+ function(iput) {
2
+ if (!iput.propertyName) return {"error" : "missing property name"};
3
+ return (iput.propertyName + iput.propertyName).toUpperCase();
4
+ }
@@ -0,0 +1,5 @@
1
+ function(iput) {
2
+ if (!iput.propertyName) return {"error" : "missing property name"};
3
+ gs.info(`transformTst:brokertran requested prop '${iput.propertyName}'`);
4
+ return `${gs.getProperty(iput.propertyName)}>`;
5
+ }
@@ -0,0 +1,4 @@
1
+ function(iput) {
2
+ if (!iput.pattern) return {"error" : "missing property pattern"};
3
+ return 45;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "3.5.1",
3
+ "version": "3.6.1",
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
@@ -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 leve is error because we check only snLint/eslint return value,
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": {
@@ -1,4 +0,0 @@
1
- /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "fx" }] */
2
- function fx(a, b) {
3
- console.info(`Something about ${a} and ${b}`);
4
- }