@admc.com/eslintplugin-sn-test 3.13.0 → 3.14.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,5 @@
1
1
  (function() {
2
2
  "use strict";
3
- return `I am ${gs.getUserName()}`;
3
+ let v = gs.getUserName;
4
+ return `I am ${v}`;
4
5
  })();
@@ -0,0 +1,5 @@
1
+ function(iput) {
2
+ if (!iput.propertyName) return {"error" : "missing property name"};
3
+ console.info(`getCappedProp:brokerscr input (${iput.propertyName})`);
4
+ return (iput.propertyName + iput.propertyName).toUpperCase();
5
+ }
@@ -0,0 +1,6 @@
1
+ const combine = () => {
2
+ const intP1 = 1; // eslint-disable-line no-unused-vars
3
+ const intP2 = "two"; // eslint-disable-line no-unused-vars
4
+ return `${intP1}|${intP2}`;
5
+ };
6
+ gs.log(combine(), "logsrc");
@@ -0,0 +1,4 @@
1
+ const combine = () => {
2
+ return `1|two`;
3
+ };
4
+ gs.log(combine(), "logsrc");
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line no-unused-vars
2
+ const combine = (p1,p2) => { const q1 = p1; const q2 = p2; return `${q1}|${q2}`; }; gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,5 @@
1
+ gs.log(((p1, p2) => {
2
+ const inP1 = p1; // eslint-disable-line no-unused-vars
3
+ const inP2 = p2; // eslint-disable-line no-unused-vars
4
+ return `${inP1}|${inP2}`;
5
+ })(1, "two"), "logSrc");
@@ -0,0 +1 @@
1
+ gs.log(((p1, p2) => `${p1}|${p2}`)(1, "two"), "logsrc"); // eslint-disable-line no-unused-vars
@@ -0,0 +1,5 @@
1
+ // eslint-disable-next-line no-unused-vars
2
+ const combine = (p1, p2) =>
3
+ `${p1}|${p2}`
4
+ ;
5
+ gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line no-unused-vars
2
+ const combine = (p1, p2) => `${p1}|${p2}`; gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,9 @@
1
+ /* eslint-disable no-unused-vars */
2
+ const combine
3
+ =
4
+ (p1, p2) =>
5
+ `${p1}|
6
+ ${p2}`
7
+ ;
8
+ /* eslint-enable no-unused-vars */
9
+ gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,12 @@
1
+ const
2
+ combine
3
+ =
4
+ (p1,
5
+ p2) =>
6
+ {
7
+ const intP1 = p1; // eslint-disable-line no-unused-vars
8
+ const intP2 = p2; // eslint-disable-line no-unused-vars
9
+ return `${p1}|${p2}`;
10
+ }
11
+ ;
12
+ gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,6 @@
1
+ const combine = (p1, p2) => {
2
+ const inP1 = p1; // eslint-disable-line no-unused-vars
3
+ const inP2 = p2; // eslint-disable-line no-unused-vars
4
+ return `${inP1}|${inP2}`;
5
+ };
6
+ gs.log(combine(1, "two"), "logsrc");
@@ -0,0 +1,3 @@
1
+ const c = "A constant"; // eslint-disable-line no-unused-vars
2
+ gs.log(`c =
3
+ (${c})`, "logSrc");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "3.13.0",
3
+ "version": "3.14.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
@@ -66,6 +66,13 @@
66
66
  "files":
67
67
  ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sys_ui_context_menu)/*/*.js"],
68
68
  "rules": { "no-template-curly-in-string": "off" }
69
+ }, {
70
+ "files": ["**/sys_ux_data_broker_scriptlet/all/*.js"],
71
+ "rules": {
72
+ "@admc.com/sn/single-fn": ["error", { "table": "sys_ux_data_broker_scriptlet" }],
73
+ "@admc.com/sn/no-toplvl-arrow-fn": "error",
74
+ "strict": "off"
75
+ }
69
76
  }, {
70
77
  "files":
71
78
  ["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sys_ui_context_menu|sys_script_validator|catalog_script_client)/*/*.js"],
@@ -1,5 +0,0 @@
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
-