jmap-carlsource-js 1.2.1 → 2.0.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.
- package/.browserslistrc +4 -0
- package/.eslintrc.js +243 -0
- package/.prettierrc +2 -2
- package/package.json +57 -67
- package/public/index.js +101 -89
package/.browserslistrc
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
const path = require("path")
|
|
2
|
+
module.exports = {
|
|
3
|
+
env: {
|
|
4
|
+
browser: true
|
|
5
|
+
},
|
|
6
|
+
// TODO: add "eslint:recommended" to extends one day
|
|
7
|
+
extends: ["plugin:@typescript-eslint/recommended-type-checked", "prettier"],
|
|
8
|
+
parser: "@typescript-eslint/parser",
|
|
9
|
+
parserOptions: {
|
|
10
|
+
project: path.join(__dirname, "tsconfig.json"),
|
|
11
|
+
sourceType: "module"
|
|
12
|
+
},
|
|
13
|
+
plugins: ["eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow", "@typescript-eslint"],
|
|
14
|
+
root: true,
|
|
15
|
+
rules: {
|
|
16
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
17
|
+
"@typescript-eslint/array-type": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
default: "array-simple"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"@typescript-eslint/ban-types": [
|
|
24
|
+
"error",
|
|
25
|
+
{
|
|
26
|
+
types: {
|
|
27
|
+
"Object": {
|
|
28
|
+
message: "Avoid using the `Object` type. Did you mean `object`?"
|
|
29
|
+
},
|
|
30
|
+
"Function": {
|
|
31
|
+
message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
|
|
32
|
+
},
|
|
33
|
+
"Boolean": {
|
|
34
|
+
message: "Avoid using the `Boolean` type. Did you mean `boolean`?"
|
|
35
|
+
},
|
|
36
|
+
"Number": {
|
|
37
|
+
message: "Avoid using the `Number` type. Did you mean `number`?"
|
|
38
|
+
},
|
|
39
|
+
"String": {
|
|
40
|
+
message: "Avoid using the `String` type. Did you mean `string`?"
|
|
41
|
+
},
|
|
42
|
+
"Symbol": {
|
|
43
|
+
message: "Avoid using the `Symbol` type. Did you mean `symbol`?"
|
|
44
|
+
},
|
|
45
|
+
"{}": false
|
|
46
|
+
},
|
|
47
|
+
extendDefaults: true
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"@typescript-eslint/consistent-type-assertions": "error",
|
|
51
|
+
"@typescript-eslint/consistent-type-definitions": "error",
|
|
52
|
+
"@typescript-eslint/dot-notation": "error",
|
|
53
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
54
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
55
|
+
"error",
|
|
56
|
+
{
|
|
57
|
+
accessibility: "explicit"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
61
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
62
|
+
"error",
|
|
63
|
+
{
|
|
64
|
+
multiline: {
|
|
65
|
+
delimiter: "none",
|
|
66
|
+
requireLast: true
|
|
67
|
+
},
|
|
68
|
+
singleline: {
|
|
69
|
+
delimiter: "semi",
|
|
70
|
+
requireLast: false
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"@typescript-eslint/member-ordering": "error",
|
|
75
|
+
"@typescript-eslint/naming-convention": "off",
|
|
76
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
77
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
78
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
79
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
80
|
+
"@typescript-eslint/no-namespace": "error",
|
|
81
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
82
|
+
"no-shadow": "off",
|
|
83
|
+
"@typescript-eslint/no-shadow": [
|
|
84
|
+
"error",
|
|
85
|
+
{
|
|
86
|
+
hoist: "never"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
90
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
91
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
92
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
93
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
94
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
95
|
+
"@typescript-eslint/quotes": [
|
|
96
|
+
"error",
|
|
97
|
+
"double",
|
|
98
|
+
{
|
|
99
|
+
avoidEscape: true
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"@typescript-eslint/semi": ["error", "never"],
|
|
103
|
+
"@typescript-eslint/triple-slash-reference": [
|
|
104
|
+
"error",
|
|
105
|
+
{
|
|
106
|
+
path: "always",
|
|
107
|
+
types: "prefer-import",
|
|
108
|
+
lib: "always"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"@typescript-eslint/type-annotation-spacing": "error",
|
|
112
|
+
"@typescript-eslint/typedef": "off",
|
|
113
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
114
|
+
"arrow-body-style": "error",
|
|
115
|
+
"arrow-parens": ["error", "as-needed"],
|
|
116
|
+
"brace-style": ["error", "1tbs"],
|
|
117
|
+
"comma-dangle": "error",
|
|
118
|
+
"complexity": "off",
|
|
119
|
+
"constructor-super": "error",
|
|
120
|
+
"curly": "error",
|
|
121
|
+
"dot-notation": "error",
|
|
122
|
+
"eol-last": "error",
|
|
123
|
+
"eqeqeq": ["error", "smart"],
|
|
124
|
+
"guard-for-in": "error",
|
|
125
|
+
"id-denylist": [
|
|
126
|
+
"off",
|
|
127
|
+
"any",
|
|
128
|
+
"Number",
|
|
129
|
+
"number",
|
|
130
|
+
"String",
|
|
131
|
+
"string",
|
|
132
|
+
"Boolean",
|
|
133
|
+
"boolean",
|
|
134
|
+
"Undefined",
|
|
135
|
+
"undefined"
|
|
136
|
+
],
|
|
137
|
+
"id-match": "off",
|
|
138
|
+
"import/order": "off",
|
|
139
|
+
"jsdoc/check-alignment": "error",
|
|
140
|
+
"jsdoc/check-indentation": "error",
|
|
141
|
+
"max-classes-per-file": ["error", 10],
|
|
142
|
+
"max-len": [
|
|
143
|
+
"error",
|
|
144
|
+
{
|
|
145
|
+
code: 222
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"new-parens": "error",
|
|
149
|
+
"no-bitwise": "error",
|
|
150
|
+
"no-caller": "error",
|
|
151
|
+
"no-cond-assign": "error",
|
|
152
|
+
"no-console": [
|
|
153
|
+
"error",
|
|
154
|
+
{
|
|
155
|
+
allow: [
|
|
156
|
+
"warn",
|
|
157
|
+
"dir",
|
|
158
|
+
"time",
|
|
159
|
+
"timeEnd",
|
|
160
|
+
"timeLog",
|
|
161
|
+
"trace",
|
|
162
|
+
"assert",
|
|
163
|
+
"clear",
|
|
164
|
+
"count",
|
|
165
|
+
"countReset",
|
|
166
|
+
"group",
|
|
167
|
+
"groupEnd",
|
|
168
|
+
"table",
|
|
169
|
+
"debug",
|
|
170
|
+
"info",
|
|
171
|
+
"dirxml",
|
|
172
|
+
"error",
|
|
173
|
+
"groupCollapsed",
|
|
174
|
+
"Console",
|
|
175
|
+
"profile",
|
|
176
|
+
"profileEnd",
|
|
177
|
+
"timeStamp",
|
|
178
|
+
"context"
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"no-debugger": "error",
|
|
183
|
+
"no-empty": "error",
|
|
184
|
+
"no-empty-function": "error",
|
|
185
|
+
"no-eval": "off",
|
|
186
|
+
"no-fallthrough": "off",
|
|
187
|
+
"no-invalid-this": "off",
|
|
188
|
+
"no-multiple-empty-lines": "error",
|
|
189
|
+
"no-new-wrappers": "error",
|
|
190
|
+
"no-throw-literal": "error",
|
|
191
|
+
"no-trailing-spaces": [
|
|
192
|
+
"error",
|
|
193
|
+
{
|
|
194
|
+
ignoreComments: true
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"no-undef-init": "error",
|
|
198
|
+
"no-underscore-dangle": "off",
|
|
199
|
+
"no-unreachable": "error",
|
|
200
|
+
"no-unsafe-finally": "error",
|
|
201
|
+
"no-unused-expressions": "error",
|
|
202
|
+
"no-unused-labels": "error",
|
|
203
|
+
"no-use-before-define": "off",
|
|
204
|
+
"no-var": "error",
|
|
205
|
+
"object-shorthand": "error",
|
|
206
|
+
"one-var": ["error", "never"],
|
|
207
|
+
"prefer-const": "error",
|
|
208
|
+
"quote-props": ["error", "consistent-as-needed"],
|
|
209
|
+
"quotes": ["error", "double", "avoid-escape"],
|
|
210
|
+
"radix": "error",
|
|
211
|
+
"semi": ["error", "never"],
|
|
212
|
+
"space-before-function-paren": [
|
|
213
|
+
"error",
|
|
214
|
+
{
|
|
215
|
+
anonymous: "never",
|
|
216
|
+
asyncArrow: "always",
|
|
217
|
+
named: "never"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"spaced-comment": [
|
|
221
|
+
"error",
|
|
222
|
+
"always",
|
|
223
|
+
{
|
|
224
|
+
markers: ["/"]
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"use-isnan": "error",
|
|
228
|
+
"valid-typeof": "off",
|
|
229
|
+
"no-unused-vars": "off",
|
|
230
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
231
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
232
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
233
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
234
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
235
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
236
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
237
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
238
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
239
|
+
"@typescript-eslint/unbound-method": "off",
|
|
240
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
241
|
+
"@typescript-eslint/require-await": "off"
|
|
242
|
+
}
|
|
243
|
+
}
|
package/.prettierrc
CHANGED
package/package.json
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmap-carlsource-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Carl-Source JMap NG Extension",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "public/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"build-dev": "export NODE_ENV='development'; gulp --gulpfile build/gulpfile.js;",
|
|
13
|
-
"build-win": "gulp --gulpfile build/gulpfile.js",
|
|
14
|
-
"analyse": "gulp analyse-webpack --gulpfile build/gulpfile.js",
|
|
15
|
-
"copy": "export NODE_ENV='development'; gulp copy-html --gulpfile build/gulpfile.js;",
|
|
16
|
-
"count-all": "find ./src -name '*.ts*' | xargs wc -l",
|
|
17
|
-
"count-test": "find ./src -name '*.spec.ts' | xargs wc -l",
|
|
18
|
-
"start": "gulp --gulpfile build/gulpfile.js start"
|
|
9
|
+
"lint": "export NODE_ENV='production'; node build/buildfile.js lint;",
|
|
10
|
+
"build": "node build/buildfile.js build ",
|
|
11
|
+
"start": "export NODE_ENV='development'; node build/buildfile.js start;"
|
|
19
12
|
},
|
|
20
13
|
"author": "K2 Geospatial developer",
|
|
21
14
|
"license": "ISC",
|
|
@@ -24,63 +17,60 @@
|
|
|
24
17
|
"node_modules"
|
|
25
18
|
],
|
|
26
19
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@
|
|
31
|
-
"axios": "^
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"react": "^
|
|
37
|
-
"
|
|
38
|
-
"react
|
|
39
|
-
"
|
|
20
|
+
"color": "^5.0.0"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@mui/material": "^5.15.18",
|
|
24
|
+
"axios": "^1.6.8",
|
|
25
|
+
"core-js": "^3.37.1",
|
|
26
|
+
"maplibre-gl": "^4.5.0",
|
|
27
|
+
"react": "^18.3.1",
|
|
28
|
+
"react-dom": "^18.3.1",
|
|
29
|
+
"react-redux": "^9.1.2",
|
|
30
|
+
"redux": "^5.0.1",
|
|
31
|
+
"@emotion/react": "^11.11.4",
|
|
32
|
+
"@emotion/styled": "^11.11.5"
|
|
40
33
|
},
|
|
41
34
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
35
|
+
"@babel/core": "^7.24.5",
|
|
36
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
37
|
+
"@babel/plugin-transform-arrow-functions": "^7.24.1",
|
|
38
|
+
"@babel/plugin-transform-class-properties": "^7.24.1",
|
|
39
|
+
"@babel/plugin-transform-object-assign": "^7.24.1",
|
|
40
|
+
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
41
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
42
|
+
"@babel/preset-env": "^7.24.5",
|
|
43
|
+
"@babel/preset-react": "^7.24.1",
|
|
44
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
45
|
+
"@babel/runtime": "^7.24.5",
|
|
46
|
+
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
47
|
+
"@fortawesome/react-fontawesome": "^0.2.1",
|
|
48
|
+
"@types/react": "^18.3.2",
|
|
49
|
+
"@types/react-dom": "^18.3.0",
|
|
50
|
+
"@types/react-redux": "^7.1.33",
|
|
51
|
+
"@types/react-window": "^1.8.8",
|
|
52
|
+
"@types/webpack-env": "^1.18.5",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^7.9.0",
|
|
54
|
+
"@typescript-eslint/parser": "^7.9.0",
|
|
55
|
+
"babel-loader": "^9.1.3",
|
|
56
|
+
"css-loader": "^7.1.1",
|
|
57
|
+
"del": "^6.0.0",
|
|
58
|
+
"eslint": "^8.56.0",
|
|
59
|
+
"eslint-config-prettier": "^9.1.0",
|
|
60
|
+
"eslint-plugin-import": "^2.29.1",
|
|
61
|
+
"eslint-plugin-jsdoc": "^48.2.5",
|
|
62
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
63
|
+
"jmapserver-ng-core-types": "2.4.0",
|
|
64
|
+
"jmapserver-ng-types": "2.4.1",
|
|
65
|
+
"postcss": "^8.5.3",
|
|
66
|
+
"postcss-loader": "^8.1.1",
|
|
72
67
|
"postcss-parent-selector": "^1.0.0",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"ts-loader": "^
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"vinyl-paths": "^2.1.0",
|
|
81
|
-
"webpack": "^4.34.0",
|
|
82
|
-
"webpack-bundle-analyzer": "^3.3.2",
|
|
83
|
-
"webpack-dev-server": "^3.11.2",
|
|
84
|
-
"webpack-stream": "^5.2.1"
|
|
68
|
+
"style-loader": "^4.0.0",
|
|
69
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
70
|
+
"ts-loader": "^9.5.1",
|
|
71
|
+
"typescript": "^5.4.5",
|
|
72
|
+
"webpack": "^5.91.0",
|
|
73
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
|
74
|
+
"webpack-dev-server": "^5.0.4"
|
|
85
75
|
}
|
|
86
|
-
}
|
|
76
|
+
}
|