@gandalan/weblibs 1.3.10 → 1.3.12
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/api/RESTClient.js +0 -4
- package/api/authUtils.js +0 -1
- package/eslint.config.js +76 -0
- package/package.json +6 -2
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -57
package/api/RESTClient.js
CHANGED
|
@@ -158,7 +158,6 @@ export class RESTClient
|
|
|
158
158
|
{
|
|
159
159
|
// The request was made and the server responded with a status code
|
|
160
160
|
// that falls out of the range of 2xx
|
|
161
|
-
// eslint-disable-next-line
|
|
162
161
|
console.error(error.response.data, error.response.status, error.response.headers);
|
|
163
162
|
}
|
|
164
163
|
else if (error.request)
|
|
@@ -166,17 +165,14 @@ export class RESTClient
|
|
|
166
165
|
// The request was made but no response was received
|
|
167
166
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
|
168
167
|
// http.ClientRequest in node.js
|
|
169
|
-
// eslint-disable-next-line
|
|
170
168
|
console.error("Request", error.request);
|
|
171
169
|
}
|
|
172
170
|
else
|
|
173
171
|
{
|
|
174
172
|
// Something happened in setting up the request that triggered an Error
|
|
175
|
-
// eslint-disable-next-line
|
|
176
173
|
console.error("Error", error.message);
|
|
177
174
|
}
|
|
178
175
|
|
|
179
|
-
// eslint-disable-next-line
|
|
180
176
|
console.info("Config", error.config);
|
|
181
177
|
this.lastError = error;
|
|
182
178
|
}
|
package/api/authUtils.js
CHANGED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
import babelParser from "@babel/eslint-parser";
|
|
3
|
+
import js from "@eslint/js";
|
|
4
|
+
import svelteParser from "svelte-eslint-parser";
|
|
5
|
+
import eslintPluginSvelte from "eslint-plugin-svelte";
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
// add more generic rule sets here, such as:
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
...eslintPluginSvelte.configs["flat/recommended"],
|
|
11
|
+
{
|
|
12
|
+
ignores: [
|
|
13
|
+
"**/.DS_Store",
|
|
14
|
+
"**/node_modules",
|
|
15
|
+
"build",
|
|
16
|
+
".svelte-kit",
|
|
17
|
+
"package",
|
|
18
|
+
"**/.env",
|
|
19
|
+
"**/.env.*",
|
|
20
|
+
"!**/.env.example",
|
|
21
|
+
"**/pnpm-lock.yaml",
|
|
22
|
+
"**/package-lock.json",
|
|
23
|
+
"**/yarn.lock",
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: ["**/*.svelte", "*.svelte"],
|
|
28
|
+
languageOptions: {
|
|
29
|
+
parser: svelteParser,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
languageOptions: {
|
|
34
|
+
globals: {
|
|
35
|
+
...globals.browser,
|
|
36
|
+
...globals.node,
|
|
37
|
+
},
|
|
38
|
+
parser: babelParser,
|
|
39
|
+
parserOptions: {
|
|
40
|
+
requireConfigFile: false,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
rules: {
|
|
46
|
+
"yoda": "warn",
|
|
47
|
+
eqeqeq: ["warn", "smart"],
|
|
48
|
+
indent: ["warn", 4, { "SwitchCase": 1 }],
|
|
49
|
+
quotes: ["warn", "double"],
|
|
50
|
+
semi: ["off", "never"],
|
|
51
|
+
"no-multi-spaces": ["warn", { ignoreEOLComments: true }],
|
|
52
|
+
"curly": "off",
|
|
53
|
+
"comma-spacing": "warn",
|
|
54
|
+
"brace-style": ["off"],
|
|
55
|
+
"no-var": "warn",
|
|
56
|
+
"key-spacing": "warn",
|
|
57
|
+
"keyword-spacing": "warn",
|
|
58
|
+
"space-infix-ops": "warn",
|
|
59
|
+
"arrow-spacing": "warn",
|
|
60
|
+
"no-trailing-spaces": "off",
|
|
61
|
+
"space-before-blocks": "warn",
|
|
62
|
+
"no-unused-vars": ["warn", { "args": "none" }],
|
|
63
|
+
"no-console": "off",
|
|
64
|
+
"no-extra-boolean-cast": "off",
|
|
65
|
+
"no-multiple-empty-lines": ["warn", { "max": 1, "maxBOF": 0 }],
|
|
66
|
+
"lines-between-class-members": ["warn", "always", { exceptAfterSingleLine: true }],
|
|
67
|
+
"no-unneeded-ternary": "warn",
|
|
68
|
+
"no-else-return": ["warn", { "allowElseIf": false }],
|
|
69
|
+
"array-bracket-newline": ["warn", "consistent"],
|
|
70
|
+
"eol-last": ["warn", "always"],
|
|
71
|
+
"prefer-template": "warn",
|
|
72
|
+
"template-curly-spacing": ["warn", "never"],
|
|
73
|
+
"comma-dangle": ["off"],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gandalan/weblibs",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12",
|
|
4
4
|
"description": "WebLibs for Gandalan JS/TS/Svelte projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gandalan"
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"author": "Philipp Reif",
|
|
14
14
|
"main": "index",
|
|
15
15
|
"typings": "index",
|
|
16
|
+
"type": "module",
|
|
16
17
|
"scripts": {
|
|
17
18
|
"svelte-check": "svelte-check",
|
|
18
19
|
"svelte-check:watch": "svelte-check --watch",
|
|
@@ -27,9 +28,12 @@
|
|
|
27
28
|
"validator": "^13.12.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
31
|
+
"@babel/core": "^7.26.0",
|
|
30
32
|
"@babel/eslint-parser": "^7.26.5",
|
|
31
|
-
"eslint": "^
|
|
33
|
+
"@eslint/js": "^9.18.0",
|
|
34
|
+
"eslint": "^9.18.0",
|
|
32
35
|
"eslint-plugin-svelte": "^2.46.1",
|
|
36
|
+
"globals": "^15.14.0",
|
|
33
37
|
"svelte": "^4.2.19",
|
|
34
38
|
"svelte-check": "^3.8.6"
|
|
35
39
|
},
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
extends: [
|
|
4
|
-
// add more generic rule sets here, such as:
|
|
5
|
-
"eslint:recommended",
|
|
6
|
-
"plugin:svelte/recommended",
|
|
7
|
-
],
|
|
8
|
-
overrides: [
|
|
9
|
-
{
|
|
10
|
-
files: ["*.svelte"],
|
|
11
|
-
parser: "svelte-eslint-parser",
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
parser: "@babel/eslint-parser",
|
|
15
|
-
parserOptions: {
|
|
16
|
-
requireConfigFile: false,
|
|
17
|
-
sourceType: "module",
|
|
18
|
-
ecmaVersion: 2020,
|
|
19
|
-
},
|
|
20
|
-
env: {
|
|
21
|
-
browser: true,
|
|
22
|
-
es2017: true,
|
|
23
|
-
node: true,
|
|
24
|
-
},
|
|
25
|
-
rules: {
|
|
26
|
-
"yoda": "warn",
|
|
27
|
-
eqeqeq: ["warn", "smart"],
|
|
28
|
-
indent: ["warn", 4, { "SwitchCase": 1 }],
|
|
29
|
-
quotes: ["warn", "double"],
|
|
30
|
-
semi: ["off", "never"],
|
|
31
|
-
"no-multi-spaces": ["warn", { ignoreEOLComments: true }],
|
|
32
|
-
"curly": "off",
|
|
33
|
-
"comma-spacing": "warn",
|
|
34
|
-
"brace-style": ["off"],
|
|
35
|
-
"no-var": "warn",
|
|
36
|
-
"key-spacing": "warn",
|
|
37
|
-
"keyword-spacing": "warn",
|
|
38
|
-
"space-infix-ops": "warn",
|
|
39
|
-
"arrow-spacing": "warn",
|
|
40
|
-
"no-trailing-spaces": "off",
|
|
41
|
-
"space-before-blocks": "warn",
|
|
42
|
-
"no-unused-vars": ["warn", {
|
|
43
|
-
"args": "none",
|
|
44
|
-
}],
|
|
45
|
-
"no-console": "off",
|
|
46
|
-
"no-extra-boolean-cast": "off",
|
|
47
|
-
"no-multiple-empty-lines": ["warn", { "max": 1, "maxBOF": 0 }],
|
|
48
|
-
"lines-between-class-members": ["warn", "always", { exceptAfterSingleLine: true }],
|
|
49
|
-
"no-unneeded-ternary": "warn",
|
|
50
|
-
"no-else-return": ["warn", { "allowElseIf": false }],
|
|
51
|
-
"array-bracket-newline": ["warn", "consistent"],
|
|
52
|
-
"eol-last": ["warn", "always"],
|
|
53
|
-
"prefer-template": "warn",
|
|
54
|
-
"template-curly-spacing": ["warn", "never"],
|
|
55
|
-
"comma-dangle": ["off"],
|
|
56
|
-
}
|
|
57
|
-
};
|