@admc.com/eslintplugin-sn-test 3.12.0 → 3.12.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 @@
|
|
|
1
|
+
for (var i = 0; i < 10; i++) gs.log(i, "src");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
// Test availability of global vars from the different component lists:
|
|
3
|
+
gs.log("a message", "a source"); // coreServerObjects.txt
|
|
4
|
+
gs.log(SNC.CMDBUtil.getTables0("sys_db_object"), "src"); // directly in exports.js
|
|
5
|
+
gs.log(Object.keys(new sn_codesearch.CodeSearch()).length, "src"); // SIScopes
|
|
6
|
+
|
|
7
|
+
var varsAreAllowed = "a val";
|
|
8
|
+
gs.log(varsAreAllowed, "2nd");
|
|
9
|
+
|
|
10
|
+
const con = "a val";
|
|
11
|
+
con += "addition"; // Can't test for const changes
|
|
12
|
+
gs.log(con, "2nd");
|
|
13
|
+
})(previous, current);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
(function() {
|
|
2
|
+
var varsAreAllowed;
|
|
3
|
+
const con = "a val";
|
|
2
4
|
// Test availability of global vars from the different component lists:
|
|
3
5
|
gs.log("a message", "a source"); // coreServerObjects.txt
|
|
4
6
|
gs.log(SNC.CMDBUtil.getTables0("sys_db_object"), "src"); // directly in exports.js
|
|
5
7
|
gs.log(Object.keys(new sn_codesearch.CodeSearch()).length, "src"); // SIScopes
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
varsAreAllowed = "a val";
|
|
8
10
|
gs.log(varsAreAllowed, "2nd");
|
|
9
11
|
|
|
10
|
-
const con = "a val";
|
|
11
12
|
con += "addition"; // Can't test for const changes
|
|
12
13
|
gs.log(con, "2nd");
|
|
13
14
|
})(previous, current);
|
package/package.json
CHANGED
package/sneslintrc.json
CHANGED
|
@@ -57,6 +57,13 @@
|
|
|
57
57
|
}, { // Same reason as the warn-to-error overides above, but rule applies only to some scripts.
|
|
58
58
|
"files": [ "**/catalog_script_client/*/*.js" ],
|
|
59
59
|
"rules": { "@admc.com/sn/no-backtick-curlyref": "error" }
|
|
60
|
+
}, { // Same reason as the warn-to-error overides above, but rule applies only to some scripts.
|
|
61
|
+
"files": [
|
|
62
|
+
"**/@(global|iso_global|noniso_global)/*.js", "**/sys_variable_value/s*_global/*.js" ],
|
|
63
|
+
"rules": { "vars-on-top": "error" }
|
|
64
|
+
}, { // Same reason as the warn-to-error overides above, but rule applies only to some scripts.
|
|
65
|
+
"files": [ "**/global/*.js", "**/sys_variable_value/s*_global/*.js" ],
|
|
66
|
+
"rules": { "@admc.com/sn/no-log-console": "error" }
|
|
60
67
|
}, {
|
|
61
68
|
// Reverting eslint-plugin-sn exceptions back, because we overrode them generally above
|
|
62
69
|
// when raising warnings to errors.
|