@admc.com/eslintplugin-sn-test 1.0.10 → 1.1.2

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 @@
1
+ console.info(action.getGlideURI());
@@ -0,0 +1 @@
1
+ console.info(action.getGlideURI());
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ gs.info("all is well");
3
+ })(gs);
@@ -0,0 +1 @@
1
+ gs.log("Helo world", "src");
@@ -0,0 +1 @@
1
+ gs.log(action.getGlideURI(), "src");
@@ -0,0 +1 @@
1
+ gs.info(action.getGlideURI());
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ gs.info("all is well");
3
+ })(value);
@@ -1 +1 @@
1
- gs.info("scoped log");
1
+ answer = true;
@@ -0,0 +1 @@
1
+ answer = true;
@@ -1,2 +1,2 @@
1
1
  const msg = "a ok";
2
- console.info(msg);
2
+ console.info(msg + " now");
package/masterTest.js CHANGED
@@ -14,7 +14,7 @@ const tableBase = ex[3];
14
14
  const scriptPath = path.join(`${ex[1]}Scripts`, `${altscope?(altscope+"/"):""}${tableBase}.js`);
15
15
  if (!fs.existsSync(scriptPath)) throw new Error(`Script file missing: ${scriptPath}`);
16
16
  if (!fs.statSync(scriptPath).isFile()) throw new Error(`Script is not a file: ${scriptPath}`);
17
- const params = [ "node_modules/.bin/snLint", scriptPath ];
17
+ const params = [ "node_modules/.bin/snLint", scriptPath, "-c" ];
18
18
  if (altscope) params.splice(1, 0, "-a", altscope);
19
19
  if (process.env.DEBUG) {
20
20
  params.splice(1, 0, "-d");
@@ -25,6 +25,6 @@ const childProcess = require("child_process").
25
25
 
26
26
  it(altscope ? `${tableBase} | ${altscope}` : tableBase, () => {
27
27
  if (shouldSucceed && childProcess.status !== 0
28
- || !shouldSucceed && childProcess.status === 0)
28
+ || !shouldSucceed && childProcess.status !== 1)
29
29
  throw new Error(`Failed with code ${childProcess.status}`);
30
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "1.0.10",
3
+ "version": "1.1.2",
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.34"
31
+ "@admc.com/eslint-plugin-sn": "^1.1.6"
32
32
  }
33
33
  }
package/sneslintrc.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "no-array-constructor": "error",
18
18
  "max-depth": "error",
19
19
  "dot-notation": "error",
20
- "camelcase": ["error", { "properties": "never" }],
20
+ "camelcase": ["error", { "properties": "never", "ignoreGlobals": true }],
21
21
  "no-template-curly-in-string": "error",
22
22
  "eqeqeq": "error",
23
23
  "semi": "error",
@@ -30,15 +30,9 @@
30
30
  "files": [
31
31
  "**//@(global|scoped)/*.js",
32
32
  "**/sys_ui_action/@(iso|noniso)_@(global|scoped)action/*.js"
33
- ],
34
- "rules": {
35
- "camelcase": ["error", { "properties": "never", "ignoreGlobals": true }]
36
- }
33
+ ]
37
34
  },{ // ES6 overrides
38
- "files": [
39
- "**/@(noniso|iso)/*.js",
40
- "**/sys_ui_script/*.js"
41
- ],
35
+ "files": [ "**/@(noniso|iso)/*.js" ],
42
36
  "rules": {
43
37
  "strict": ["error", "safe"],
44
38
  "prefer-arrow-callback": "error",
@@ -46,7 +40,27 @@
46
40
  "no-useless-rename": "error",
47
41
  "no-var": "error",
48
42
  "prefer-template": "error"
43
+ },
44
+ "files": [ "**/sys_ui_script/*.js" ],
45
+ "rules": {
46
+ "strict": ["error", "safe"],
47
+ "prefer-arrow-callback": "error",
48
+ "object-shorthand": "error",
49
+ "no-useless-rename": "error",
50
+ "no-var": "error"
49
51
  }
52
+ }, { // Custom table and scope
53
+ "files": [ "**/custom_table/custom_alt/*.js" ],
54
+ "env": {"@admc.com/sn/sn_server_global": true },
55
+ "rules": {
56
+ "@admc.com/sn/invalid-table-altscope": "off",
57
+ "@admc.com/sn/log-global-2-args": "error",
58
+ "@admc.com/sn/no-log-scoped": "error"
59
+ }
50
60
  }
51
- ]
61
+ ],
62
+ "settings": {
63
+ "customTables": ["custom_table"],
64
+ "customAlts": ["custom_alt"]
65
+ }
52
66
  }