@admc.com/eslintplugin-sn-test 1.0.1 → 1.0.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.
package/.eslintrc.json
CHANGED
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
"parserOptions": { "ecmaVersion": "latest" },
|
|
7
7
|
"ignorePatterns": ["goodScripts/**", "badScripts/**", "test/**"],
|
|
8
8
|
"rules": {
|
|
9
|
-
"camelcase": "warn",
|
|
9
|
+
"camelcase": ["warn", { "properties": "never" }],
|
|
10
10
|
"eqeqeq": "error",
|
|
11
|
-
"no-var": "error",
|
|
12
|
-
"prefer-const": "error",
|
|
13
11
|
"semi": "error",
|
|
14
12
|
"no-unreachable-loop": "error",
|
|
15
13
|
"no-use-before-define": ["error", { "functions": false, "classes": false }],
|
|
@@ -52,6 +50,8 @@
|
|
|
52
50
|
"array-callback-return": ["error", { "checkForEach": true }],
|
|
53
51
|
|
|
54
52
|
// Post-ES6
|
|
53
|
+
"no-var": "error",
|
|
54
|
+
"prefer-const": "error",
|
|
55
55
|
"strict": ["error", "safe"],
|
|
56
56
|
"prefer-exponentiation-operator": "error",
|
|
57
57
|
"prefer-arrow-callback": "error",
|
package/functions.bash
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Useful shell functions
|
|
2
2
|
|
|
3
3
|
function rchead() {
|
|
4
|
-
local TARGET_FILE=
|
|
4
|
+
local TARGET_FILE=sneslintrc.json
|
|
5
5
|
local SYNTAX_MSG='SYNTAX: rchead n # where n is a positive integer'
|
|
6
6
|
[ -f "$TARGET_FILE" ] || {
|
|
7
7
|
echo "rchead file '$TARGET_FILE' not present or not a file" 1>&2
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Test availability of global vars from the different component lists:
|
|
2
2
|
gs.log("a message", "a source"); // coreServerObjects.txt
|
|
3
3
|
gs.log(SNC.CMDBUtil.getTables0("sys_db_object"), "src"); // directly in exports.js
|
|
4
|
-
// eslint-disable-next-line camelcase
|
|
5
4
|
gs.log(Object.keys(new sn_codesearch.CodeSearch()).length, "src"); // SIScopes
|
|
6
5
|
|
|
7
6
|
var varsAreAllowed = "a val";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// Test availability of scoped vars from the different component lists:
|
|
2
|
-
/* eslint-disable camelcase */
|
|
3
2
|
gs.info(new sn_ws_err.NotAcceptableError("fake err")); // coreServerObjects.txt
|
|
4
3
|
gs.info(Object.keys(new sn_codesearch.CodeSearch()).length); // SIScopes
|
|
5
|
-
/* eslint-enable camelcase */
|
|
6
4
|
|
|
7
5
|
var varsAreAllowed = "a val";
|
|
8
6
|
gs.info(varsAreAllowed);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admc.com/eslintplugin-sn-test",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "External tests for ESLint plugin @admc.com/eslint-plugin-sn",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "mocha --recursive",
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/unsaved/eslint-plugin-sn#readme",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@admc.com/eslint-plugin-sn": "^1.0.1",
|
|
29
28
|
"mocha": "^10.0.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@admc.com/eslint-plugin-sn": "^1.0.6"
|
|
30
32
|
}
|
|
31
33
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"no-array-constructor": "error",
|
|
18
18
|
"max-depth": "error",
|
|
19
19
|
"dot-notation": "error",
|
|
20
|
-
"camelcase": "error",
|
|
20
|
+
"camelcase": ["error", { "properties": "never" }],
|
|
21
21
|
"no-template-curly-in-string": "error",
|
|
22
22
|
"eqeqeq": "error",
|
|
23
23
|
"semi": "error",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"overrides": [
|
|
27
27
|
{
|
|
28
|
+
"files": ["**/@(sa_pattern_prepost_script|sys_script_fix|sys_script|sys_script_include|sys_auto_script|sys_ws_operation|sys_web_service)/@(global|scoped)/*.js"],
|
|
29
|
+
"rules": {
|
|
30
|
+
"camelcase": ["error", { "properties": "never", "ignoreGlobals": true }]
|
|
31
|
+
}
|
|
32
|
+
},{ // ES6 overrides
|
|
28
33
|
"files": ["**/@(sys|catalog|expert)_script_client/@(noniso|iso)/*.js"],
|
|
29
34
|
"rules": {
|
|
30
35
|
"strict": ["error", "safe"],
|