5etools-utils 0.16.43 → 0.17.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.
- package/bin/lint-js.js +26 -0
- package/lib/eslint/eslint-config-rules.js +401 -0
- package/lib/eslint/eslint-config.js +67 -0
- package/lib/eslint/eslint-globals.js +242 -0
- package/package.json +6 -5
- package/schema/brew/sources-5etools.json +14 -2
- package/schema/brew-fast/sources-5etools.json +14 -2
- package/schema/site/sources-5etools.json +14 -2
- package/schema/site-fast/sources-5etools.json +14 -2
- package/schema/ua/sources-5etools.json +14 -2
- package/schema/ua-fast/sources-5etools.json +14 -2
package/bin/lint-js.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {Command} from "commander";
|
|
4
|
+
import {ESLint} from "eslint";
|
|
5
|
+
|
|
6
|
+
const program = new Command()
|
|
7
|
+
.name("vet-eslint")
|
|
8
|
+
.argument("[files...]", "Files or directories to lint")
|
|
9
|
+
.option("--fix", "Automatically fix problems")
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
program.parse(process.argv);
|
|
13
|
+
|
|
14
|
+
const opts = program.opts();
|
|
15
|
+
const eslint = new ESLint({fix: opts.fix});
|
|
16
|
+
const results = await eslint.lintFiles(program.args.length ? program.args : ["."]);
|
|
17
|
+
|
|
18
|
+
if (opts.fix) await ESLint.outputFixes(results);
|
|
19
|
+
|
|
20
|
+
const formatter = await eslint.loadFormatter("stylish");
|
|
21
|
+
const resultText = formatter.format(results);
|
|
22
|
+
if (resultText) console.log(resultText);
|
|
23
|
+
|
|
24
|
+
const cntErrors = results.reduce((cnt, result) => cnt + result.errorCount, 0);
|
|
25
|
+
|
|
26
|
+
if (cntErrors) process.exitCode = 1;
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
export const ESLINT_RULES_BASE = {
|
|
2
|
+
"accessor-pairs": "off",
|
|
3
|
+
"arrow-spacing": [
|
|
4
|
+
"error",
|
|
5
|
+
{
|
|
6
|
+
"before": true,
|
|
7
|
+
"after": true,
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
"block-spacing": [
|
|
11
|
+
"error",
|
|
12
|
+
"always",
|
|
13
|
+
],
|
|
14
|
+
"brace-style": [
|
|
15
|
+
"error",
|
|
16
|
+
"1tbs",
|
|
17
|
+
{
|
|
18
|
+
"allowSingleLine": true,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
"comma-dangle": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
"arrays": "always-multiline",
|
|
25
|
+
"objects": "always-multiline",
|
|
26
|
+
"imports": "always-multiline",
|
|
27
|
+
"exports": "always-multiline",
|
|
28
|
+
"functions": "always-multiline",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
"comma-spacing": [
|
|
32
|
+
"error",
|
|
33
|
+
{
|
|
34
|
+
"before": false,
|
|
35
|
+
"after": true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
"comma-style": [
|
|
39
|
+
"error",
|
|
40
|
+
"last",
|
|
41
|
+
],
|
|
42
|
+
"constructor-super": "error",
|
|
43
|
+
"curly": [
|
|
44
|
+
"error",
|
|
45
|
+
"multi-line",
|
|
46
|
+
],
|
|
47
|
+
"dot-location": [
|
|
48
|
+
"error",
|
|
49
|
+
"property",
|
|
50
|
+
],
|
|
51
|
+
"eqeqeq": [
|
|
52
|
+
"error",
|
|
53
|
+
"always",
|
|
54
|
+
{
|
|
55
|
+
"null": "ignore",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
"func-call-spacing": [
|
|
59
|
+
"error",
|
|
60
|
+
"never",
|
|
61
|
+
],
|
|
62
|
+
"generator-star-spacing": [
|
|
63
|
+
"error",
|
|
64
|
+
{
|
|
65
|
+
"before": false,
|
|
66
|
+
"after": true,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
"handle-callback-err": [
|
|
70
|
+
"error",
|
|
71
|
+
"^(err|error)$",
|
|
72
|
+
],
|
|
73
|
+
"indent": [
|
|
74
|
+
"error",
|
|
75
|
+
"tab",
|
|
76
|
+
{
|
|
77
|
+
"SwitchCase": 1,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
"key-spacing": [
|
|
81
|
+
"error",
|
|
82
|
+
{
|
|
83
|
+
"beforeColon": false,
|
|
84
|
+
"afterColon": true,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
"keyword-spacing": [
|
|
88
|
+
"error",
|
|
89
|
+
{
|
|
90
|
+
"before": true,
|
|
91
|
+
"after": true,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
"new-cap": [
|
|
95
|
+
"error",
|
|
96
|
+
{
|
|
97
|
+
"newIsCap": true,
|
|
98
|
+
"newIsCapExceptions": ["constructor"],
|
|
99
|
+
"capIsNew": false,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
"new-parens": "error",
|
|
103
|
+
"no-array-constructor": "error",
|
|
104
|
+
"no-caller": "error",
|
|
105
|
+
"no-class-assign": "error",
|
|
106
|
+
"no-compare-neg-zero": "error",
|
|
107
|
+
"no-cond-assign": "error",
|
|
108
|
+
"no-const-assign": "error",
|
|
109
|
+
"no-constant-binary-expression": "error",
|
|
110
|
+
"no-constant-condition": [
|
|
111
|
+
"error",
|
|
112
|
+
{
|
|
113
|
+
"checkLoops": false,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
"no-control-regex": "error",
|
|
117
|
+
"no-debugger": "error",
|
|
118
|
+
"no-delete-var": "error",
|
|
119
|
+
"no-dupe-args": "error",
|
|
120
|
+
"no-dupe-class-members": "error",
|
|
121
|
+
"no-dupe-keys": "error",
|
|
122
|
+
"no-duplicate-case": "error",
|
|
123
|
+
"no-empty-character-class": "error",
|
|
124
|
+
"no-empty-pattern": "error",
|
|
125
|
+
"no-eval": "error",
|
|
126
|
+
"no-ex-assign": "error",
|
|
127
|
+
"no-extra-bind": "error",
|
|
128
|
+
"no-extra-boolean-cast": "error",
|
|
129
|
+
"no-extra-parens": [
|
|
130
|
+
"error",
|
|
131
|
+
"functions",
|
|
132
|
+
],
|
|
133
|
+
"no-fallthrough": "error",
|
|
134
|
+
"no-floating-decimal": "error",
|
|
135
|
+
"no-func-assign": "error",
|
|
136
|
+
"no-global-assign": "error",
|
|
137
|
+
"no-implied-eval": "error",
|
|
138
|
+
"no-inner-declarations": [
|
|
139
|
+
"error",
|
|
140
|
+
"functions",
|
|
141
|
+
],
|
|
142
|
+
"no-invalid-regexp": "error",
|
|
143
|
+
"no-irregular-whitespace": "error",
|
|
144
|
+
"no-iterator": "error",
|
|
145
|
+
"no-label-var": "error",
|
|
146
|
+
"no-labels": [
|
|
147
|
+
"error",
|
|
148
|
+
{
|
|
149
|
+
"allowLoop": true,
|
|
150
|
+
"allowSwitch": false,
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
"no-lone-blocks": "error",
|
|
154
|
+
"no-mixed-operators": [
|
|
155
|
+
"error",
|
|
156
|
+
{
|
|
157
|
+
"groups": [
|
|
158
|
+
[
|
|
159
|
+
"==",
|
|
160
|
+
"!=",
|
|
161
|
+
"===",
|
|
162
|
+
"!==",
|
|
163
|
+
">",
|
|
164
|
+
">=",
|
|
165
|
+
"<",
|
|
166
|
+
"<=",
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
"&&",
|
|
170
|
+
"||",
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
"in",
|
|
174
|
+
"instanceof",
|
|
175
|
+
],
|
|
176
|
+
],
|
|
177
|
+
"allowSamePrecedence": true,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
"no-mixed-spaces-and-tabs": "error",
|
|
181
|
+
"no-multi-spaces": "error",
|
|
182
|
+
"no-multi-str": "error",
|
|
183
|
+
"no-multiple-empty-lines": [
|
|
184
|
+
"error",
|
|
185
|
+
{
|
|
186
|
+
"max": 1,
|
|
187
|
+
"maxEOF": 0,
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
"no-negated-in-lhs": "error",
|
|
191
|
+
"no-new": "error",
|
|
192
|
+
"no-new-func": "error",
|
|
193
|
+
"no-new-object": "error",
|
|
194
|
+
"no-new-require": "error",
|
|
195
|
+
"no-new-symbol": "error",
|
|
196
|
+
"no-new-wrappers": "error",
|
|
197
|
+
"no-obj-calls": "error",
|
|
198
|
+
"no-octal": "error",
|
|
199
|
+
"no-octal-escape": "error",
|
|
200
|
+
"no-path-concat": "error",
|
|
201
|
+
"no-proto": "error",
|
|
202
|
+
"no-redeclare": "error",
|
|
203
|
+
"no-regex-spaces": "error",
|
|
204
|
+
"no-return-await": "error",
|
|
205
|
+
"no-self-assign": "error",
|
|
206
|
+
"no-self-compare": "error",
|
|
207
|
+
"no-sequences": "error",
|
|
208
|
+
"no-shadow-restricted-names": "error",
|
|
209
|
+
"no-sparse-arrays": "error",
|
|
210
|
+
"no-template-curly-in-string": "error",
|
|
211
|
+
"no-this-before-super": "error",
|
|
212
|
+
"no-throw-literal": "error",
|
|
213
|
+
"no-trailing-spaces": "error",
|
|
214
|
+
"no-undef": "error",
|
|
215
|
+
"no-undef-init": "error",
|
|
216
|
+
"no-unexpected-multiline": "error",
|
|
217
|
+
"no-unmodified-loop-condition": "error",
|
|
218
|
+
"no-unneeded-ternary": [
|
|
219
|
+
"error",
|
|
220
|
+
{
|
|
221
|
+
"defaultAssignment": false,
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
"no-unreachable": "error",
|
|
225
|
+
"no-unsafe-finally": "error",
|
|
226
|
+
"no-unsafe-negation": "error",
|
|
227
|
+
"no-unused-expressions": [
|
|
228
|
+
"error",
|
|
229
|
+
{
|
|
230
|
+
"allowShortCircuit": true,
|
|
231
|
+
"allowTernary": true,
|
|
232
|
+
"allowTaggedTemplates": true,
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
"no-unused-vars": "off",
|
|
236
|
+
"no-use-before-define": [
|
|
237
|
+
"error",
|
|
238
|
+
{
|
|
239
|
+
"functions": false,
|
|
240
|
+
"classes": false,
|
|
241
|
+
"variables": false,
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
"no-useless-assignment": "off",
|
|
245
|
+
"no-useless-call": "error",
|
|
246
|
+
"no-useless-computed-key": "error",
|
|
247
|
+
"no-useless-constructor": "error",
|
|
248
|
+
"no-useless-escape": "error",
|
|
249
|
+
"no-useless-rename": "error",
|
|
250
|
+
"no-useless-return": "error",
|
|
251
|
+
"no-whitespace-before-property": "error",
|
|
252
|
+
"no-with": "error",
|
|
253
|
+
"object-property-newline": [
|
|
254
|
+
"error",
|
|
255
|
+
{
|
|
256
|
+
"allowMultiplePropertiesPerLine": true,
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
"one-var": [
|
|
260
|
+
"error",
|
|
261
|
+
{
|
|
262
|
+
"initialized": "never",
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
"operator-linebreak": [
|
|
266
|
+
"error",
|
|
267
|
+
"after",
|
|
268
|
+
{
|
|
269
|
+
"overrides": {
|
|
270
|
+
"?": "before",
|
|
271
|
+
":": "before",
|
|
272
|
+
"+": "before",
|
|
273
|
+
"-": "before",
|
|
274
|
+
"*": "before",
|
|
275
|
+
"/": "before",
|
|
276
|
+
"||": "before",
|
|
277
|
+
"&&": "before",
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
"padded-blocks": [
|
|
282
|
+
"error",
|
|
283
|
+
{
|
|
284
|
+
"blocks": "never",
|
|
285
|
+
"switches": "never",
|
|
286
|
+
"classes": "never",
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
"prefer-promise-reject-errors": "error",
|
|
290
|
+
"rest-spread-spacing": [
|
|
291
|
+
"error",
|
|
292
|
+
"never",
|
|
293
|
+
],
|
|
294
|
+
"semi": [
|
|
295
|
+
"error",
|
|
296
|
+
"always",
|
|
297
|
+
],
|
|
298
|
+
"semi-spacing": [
|
|
299
|
+
"error",
|
|
300
|
+
{
|
|
301
|
+
"before": false,
|
|
302
|
+
"after": true,
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
"space-before-blocks": [
|
|
306
|
+
"error",
|
|
307
|
+
"always",
|
|
308
|
+
],
|
|
309
|
+
"space-before-function-paren": [
|
|
310
|
+
"error",
|
|
311
|
+
"always",
|
|
312
|
+
],
|
|
313
|
+
"space-in-parens": [
|
|
314
|
+
"error",
|
|
315
|
+
"never",
|
|
316
|
+
],
|
|
317
|
+
"space-infix-ops": "error",
|
|
318
|
+
"space-unary-ops": [
|
|
319
|
+
"error",
|
|
320
|
+
{
|
|
321
|
+
"words": true,
|
|
322
|
+
"nonwords": false,
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
"spaced-comment": [
|
|
326
|
+
"error",
|
|
327
|
+
"always",
|
|
328
|
+
{
|
|
329
|
+
"line": {
|
|
330
|
+
"markers": [
|
|
331
|
+
"*package",
|
|
332
|
+
"!",
|
|
333
|
+
"/",
|
|
334
|
+
",",
|
|
335
|
+
"=",
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
"block": {
|
|
339
|
+
"balanced": true,
|
|
340
|
+
"markers": [
|
|
341
|
+
"*package",
|
|
342
|
+
"!",
|
|
343
|
+
",",
|
|
344
|
+
":",
|
|
345
|
+
"::",
|
|
346
|
+
"flow-include",
|
|
347
|
+
],
|
|
348
|
+
"exceptions": [
|
|
349
|
+
"*",
|
|
350
|
+
],
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
"symbol-description": "error",
|
|
355
|
+
"template-curly-spacing": [
|
|
356
|
+
"error",
|
|
357
|
+
"never",
|
|
358
|
+
],
|
|
359
|
+
"template-tag-spacing": [
|
|
360
|
+
"error",
|
|
361
|
+
"never",
|
|
362
|
+
],
|
|
363
|
+
"unicode-bom": [
|
|
364
|
+
"error",
|
|
365
|
+
"never",
|
|
366
|
+
],
|
|
367
|
+
"use-isnan": "error",
|
|
368
|
+
"valid-typeof": [
|
|
369
|
+
"error",
|
|
370
|
+
{
|
|
371
|
+
"requireStringLiterals": true,
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
"wrap-iife": [
|
|
375
|
+
"error",
|
|
376
|
+
"any",
|
|
377
|
+
{
|
|
378
|
+
"functionPrototypeMethods": true,
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
"yield-star-spacing": [
|
|
382
|
+
"error",
|
|
383
|
+
"both",
|
|
384
|
+
],
|
|
385
|
+
"yoda": [
|
|
386
|
+
"error",
|
|
387
|
+
"never",
|
|
388
|
+
],
|
|
389
|
+
"no-prototype-builtins": "off",
|
|
390
|
+
"require-atomic-updates": "off",
|
|
391
|
+
"no-console": "off",
|
|
392
|
+
"prefer-template": "error",
|
|
393
|
+
"quotes": [
|
|
394
|
+
"error",
|
|
395
|
+
"double",
|
|
396
|
+
{
|
|
397
|
+
"allowTemplateLiterals": true,
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
"no-var": "error",
|
|
401
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import pluginVetJquery from "./eslint-plugin-jquery.js";
|
|
4
|
+
import {ESLINT_RULES_BASE} from "./eslint-config-rules.js";
|
|
5
|
+
import {ESLINT_GLOBALS_FOUNDRY, ESLINT_GLOBALS_VETOOLS} from "./eslint-globals.js";
|
|
6
|
+
|
|
7
|
+
const _FILES_JS = ["**/*.js", "**/*.cjs", "**/*.mjs"];
|
|
8
|
+
|
|
9
|
+
export const ESLINT_CONFIG_BASE = [
|
|
10
|
+
js.configs.recommended,
|
|
11
|
+
{
|
|
12
|
+
files: _FILES_JS,
|
|
13
|
+
languageOptions: {
|
|
14
|
+
ecmaVersion: "latest",
|
|
15
|
+
sourceType: "module",
|
|
16
|
+
},
|
|
17
|
+
rules: ESLINT_RULES_BASE,
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export const ESLINT_CONFIG_BROWSER = {
|
|
22
|
+
files: _FILES_JS,
|
|
23
|
+
plugins: {
|
|
24
|
+
"vet-jquery": pluginVetJquery,
|
|
25
|
+
},
|
|
26
|
+
languageOptions: {
|
|
27
|
+
globals: globals.browser,
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
"vet-jquery/jquery": "error",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const ESLINT_CONFIG_NODE = {
|
|
35
|
+
files: _FILES_JS,
|
|
36
|
+
languageOptions: {
|
|
37
|
+
globals: globals.node,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const ESLINT_CONFIG_JEST = {
|
|
42
|
+
files: _FILES_JS,
|
|
43
|
+
languageOptions: {
|
|
44
|
+
globals: globals.jest,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const ESLINT_CONFIG_VETOOLS = {
|
|
49
|
+
files: _FILES_JS,
|
|
50
|
+
languageOptions: {
|
|
51
|
+
globals: ESLINT_GLOBALS_VETOOLS,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const ESLINT_CONFIG_FOUNDRY = {
|
|
56
|
+
files: _FILES_JS,
|
|
57
|
+
languageOptions: {
|
|
58
|
+
globals: ESLINT_GLOBALS_FOUNDRY,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const ESLINT_CONFIG_NO_CONSOLE = {
|
|
63
|
+
files: _FILES_JS,
|
|
64
|
+
rules: {
|
|
65
|
+
"no-console": "error",
|
|
66
|
+
},
|
|
67
|
+
};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
export const getEslintGlobals = names => names
|
|
2
|
+
.reduce((accum, name) => {
|
|
3
|
+
accum[name] = "readonly";
|
|
4
|
+
return accum;
|
|
5
|
+
}, {});
|
|
6
|
+
|
|
7
|
+
export const ESLINT_GLOBALS_VETOOLS = getEslintGlobals([
|
|
8
|
+
"$",
|
|
9
|
+
"_SEO_PAGE",
|
|
10
|
+
"AbilityScoreFilter",
|
|
11
|
+
"ace",
|
|
12
|
+
"AnimationUtil",
|
|
13
|
+
"BaseComponent",
|
|
14
|
+
"BlocklistUi",
|
|
15
|
+
"BlocklistUtil",
|
|
16
|
+
"BookModeViewBase",
|
|
17
|
+
"BookUtil",
|
|
18
|
+
"BrewUtil2",
|
|
19
|
+
"BrewUtilShared",
|
|
20
|
+
"BrowserUtil",
|
|
21
|
+
"CleanUtil",
|
|
22
|
+
"CollectionUtil",
|
|
23
|
+
"Color",
|
|
24
|
+
"ComponentUiUtil",
|
|
25
|
+
"ConfigUi",
|
|
26
|
+
"ConverterSpell",
|
|
27
|
+
"ContextUtil",
|
|
28
|
+
"CryptUtil",
|
|
29
|
+
"CurrencyUtil",
|
|
30
|
+
"DataLoader",
|
|
31
|
+
"DataUtil",
|
|
32
|
+
"DatetimeUtil",
|
|
33
|
+
"domtoimage",
|
|
34
|
+
"DragReorderUiUtil",
|
|
35
|
+
"ElementUtil",
|
|
36
|
+
"EditorUtil",
|
|
37
|
+
"elasticlunr",
|
|
38
|
+
"EventUtil",
|
|
39
|
+
"ExcludeUtil",
|
|
40
|
+
"ExtensionUtil",
|
|
41
|
+
"Filter",
|
|
42
|
+
"FilterBox",
|
|
43
|
+
"FILTER_BOX_EVNT_VALCHANGE",
|
|
44
|
+
"FILTER_BOX_TITLE_BTN_RESET",
|
|
45
|
+
"FilterCommon",
|
|
46
|
+
"FilterItem",
|
|
47
|
+
"FontManager",
|
|
48
|
+
"GenUtil",
|
|
49
|
+
"Handlebars",
|
|
50
|
+
"HASH_BLANK",
|
|
51
|
+
"HASH_LIST_SEP",
|
|
52
|
+
"HASH_PART_SEP",
|
|
53
|
+
"HASH_SUB_KV_SEP",
|
|
54
|
+
"HASH_SUB_LIST_SEP",
|
|
55
|
+
"HASH_SUB_NONE",
|
|
56
|
+
"Hist",
|
|
57
|
+
"IMGUR_CLIENT_ID",
|
|
58
|
+
"icon_names",
|
|
59
|
+
"InputUiUtil",
|
|
60
|
+
"IndexableFileQuickReference",
|
|
61
|
+
"IS_DEPLOYED",
|
|
62
|
+
"jQuery",
|
|
63
|
+
"JqueryUtil",
|
|
64
|
+
"List",
|
|
65
|
+
"ListItem",
|
|
66
|
+
"ListPage",
|
|
67
|
+
"ListPageBookView",
|
|
68
|
+
"ListPageMultiSource",
|
|
69
|
+
"ListPageSettingsManager",
|
|
70
|
+
"ListPageStateManager",
|
|
71
|
+
"ListPageTokenDisplay",
|
|
72
|
+
"ListSelectClickHandler",
|
|
73
|
+
"ListSelectClickHandlerBase",
|
|
74
|
+
"ListSyntaxBestiary",
|
|
75
|
+
"ListSyntaxDecks",
|
|
76
|
+
"ListSyntaxDeities",
|
|
77
|
+
"ListSyntaxItems",
|
|
78
|
+
"ListSyntaxObjects",
|
|
79
|
+
"ListSyntaxPsionics",
|
|
80
|
+
"ListSyntaxRecipes",
|
|
81
|
+
"ListSyntaxSpells",
|
|
82
|
+
"ListSyntaxTables",
|
|
83
|
+
"ListSyntaxTrapsHazards",
|
|
84
|
+
"ListSyntaxVehicles",
|
|
85
|
+
"ListUiPreviewButtonHandlerBase",
|
|
86
|
+
"ListUiPreviewButtonHandlerStatsFluff",
|
|
87
|
+
"ListUiUtil",
|
|
88
|
+
"ListUtil",
|
|
89
|
+
"ListUtilEntity",
|
|
90
|
+
"localforage",
|
|
91
|
+
"MarkdownConverter",
|
|
92
|
+
"MiscUtil",
|
|
93
|
+
"MixinBaseComponent",
|
|
94
|
+
"MixinComponentGlobalState",
|
|
95
|
+
"MixinProxyBase",
|
|
96
|
+
"ModalFilterBackgrounds",
|
|
97
|
+
"ModalFilterBase",
|
|
98
|
+
"ModalFilterBestiary",
|
|
99
|
+
"ModalFilterFeats",
|
|
100
|
+
"ModalFilterItems",
|
|
101
|
+
"ModalFilterOptionalFeatures",
|
|
102
|
+
"ModalFilterRaces",
|
|
103
|
+
"ModalFilterSpells",
|
|
104
|
+
"MultiFilter",
|
|
105
|
+
"MultiSourceUtil",
|
|
106
|
+
"NavBar",
|
|
107
|
+
"NumberUtil",
|
|
108
|
+
"Omnidexer",
|
|
109
|
+
"OptionsFilter",
|
|
110
|
+
"PageFilterActions",
|
|
111
|
+
"PageFilterBackgrounds",
|
|
112
|
+
"PageFilterBase",
|
|
113
|
+
"PageFilterBastions",
|
|
114
|
+
"PageFilterBestiary",
|
|
115
|
+
"PageFilterCharCreationOptions",
|
|
116
|
+
"PageFilterClasses",
|
|
117
|
+
"PageFilterClassesBase",
|
|
118
|
+
"PageFilterConditionsDiseases",
|
|
119
|
+
"PageFilterCultsBoons",
|
|
120
|
+
"PageFilterDecks",
|
|
121
|
+
"PageFilterDeities",
|
|
122
|
+
"PageFilterFeats",
|
|
123
|
+
"PageFilterHomeCrafts",
|
|
124
|
+
"PageFilterItems",
|
|
125
|
+
"PageFilterLanguages",
|
|
126
|
+
"PageFilterObjects",
|
|
127
|
+
"PageFilterOptionalFeatures",
|
|
128
|
+
"PageFilterPsionics",
|
|
129
|
+
"PageFilterRaces",
|
|
130
|
+
"PageFilterRecipes",
|
|
131
|
+
"PageFilterRewards",
|
|
132
|
+
"PageFilterSpells",
|
|
133
|
+
"PageFilterTables",
|
|
134
|
+
"PageFilterTrapsHazards",
|
|
135
|
+
"PageFilterVariantRules",
|
|
136
|
+
"PageFilterVehicles",
|
|
137
|
+
"Parser",
|
|
138
|
+
"Peer",
|
|
139
|
+
"PeerUtilV0",
|
|
140
|
+
"PeerVeClient",
|
|
141
|
+
"PeerVeServer",
|
|
142
|
+
"polylabel",
|
|
143
|
+
"PrereleaseUtil",
|
|
144
|
+
"ProxyBase",
|
|
145
|
+
"RangeFilter",
|
|
146
|
+
"RenderableCollectionBase",
|
|
147
|
+
"RenderableCollectionAsyncGenericRows",
|
|
148
|
+
"RenderableCollectionGenericRows",
|
|
149
|
+
"RenderableCollectionSelectClickHandler",
|
|
150
|
+
"RenderCard",
|
|
151
|
+
"RendererCard",
|
|
152
|
+
"RenderCharCreationOptions",
|
|
153
|
+
"RenderCultsBoons",
|
|
154
|
+
"RenderDecks",
|
|
155
|
+
"RenderDeities",
|
|
156
|
+
"RenderEncounters",
|
|
157
|
+
"RenderLanguages",
|
|
158
|
+
"RenderNames",
|
|
159
|
+
"RenderObjects",
|
|
160
|
+
"RenderPsionics",
|
|
161
|
+
"RenderTables",
|
|
162
|
+
"RenderTrapsHazards",
|
|
163
|
+
"RenderVariantRules",
|
|
164
|
+
"RenderVehicles",
|
|
165
|
+
"Renderer",
|
|
166
|
+
"RendererMarkdown",
|
|
167
|
+
"RollerUtil",
|
|
168
|
+
"SaveManager",
|
|
169
|
+
"ScaleClassSummonedCreature",
|
|
170
|
+
"ScaleCreature",
|
|
171
|
+
"ScaleSpellSummonedCreature",
|
|
172
|
+
"SearchableFilter",
|
|
173
|
+
"SearchUiUtil",
|
|
174
|
+
"SearchUtil",
|
|
175
|
+
"SearchWidget",
|
|
176
|
+
"SessionStorageUtil",
|
|
177
|
+
"SettingsUtil",
|
|
178
|
+
"SortUtil",
|
|
179
|
+
"SourceFilter",
|
|
180
|
+
"SourceFilterItem",
|
|
181
|
+
"SourceUtil",
|
|
182
|
+
"StorageUtil",
|
|
183
|
+
"StorageUtilMemory",
|
|
184
|
+
"StrUtil",
|
|
185
|
+
"SublistCell",
|
|
186
|
+
"SublistCellTemplate",
|
|
187
|
+
"SublistManager",
|
|
188
|
+
"SublistPersistor",
|
|
189
|
+
"SublistPlugin",
|
|
190
|
+
"TabUiUtil",
|
|
191
|
+
"TabUiUtilSide",
|
|
192
|
+
"Trie",
|
|
193
|
+
"UiUtil",
|
|
194
|
+
"UidUtil",
|
|
195
|
+
"UrlUtil",
|
|
196
|
+
"UtilsTableview",
|
|
197
|
+
"UtilsChangelog",
|
|
198
|
+
"VeCt",
|
|
199
|
+
"VetoolsConfig",
|
|
200
|
+
"veE",
|
|
201
|
+
"veEm",
|
|
202
|
+
"veEs",
|
|
203
|
+
"VeLock",
|
|
204
|
+
"veT",
|
|
205
|
+
"VERSION_NUMBER",
|
|
206
|
+
"styleSwitcher",
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
export const ESLINT_GLOBALS_FOUNDRY = getEslintGlobals([
|
|
210
|
+
"ActiveEffect",
|
|
211
|
+
"Actor",
|
|
212
|
+
"Application",
|
|
213
|
+
"AudioHelper",
|
|
214
|
+
"canvas",
|
|
215
|
+
"Card",
|
|
216
|
+
"Cards",
|
|
217
|
+
"ChatMessage",
|
|
218
|
+
"CombatTracker",
|
|
219
|
+
"CONFIG",
|
|
220
|
+
"CONST",
|
|
221
|
+
"Dialog",
|
|
222
|
+
"FilePicker",
|
|
223
|
+
"Folder",
|
|
224
|
+
"foundry",
|
|
225
|
+
"fromUuid",
|
|
226
|
+
"fromUuidSync",
|
|
227
|
+
"game",
|
|
228
|
+
"Hooks",
|
|
229
|
+
"Item",
|
|
230
|
+
"JournalEntry",
|
|
231
|
+
"JournalEntryPage",
|
|
232
|
+
"Macro",
|
|
233
|
+
"Module",
|
|
234
|
+
"Ray",
|
|
235
|
+
"Roll",
|
|
236
|
+
"RollTable",
|
|
237
|
+
"Scene",
|
|
238
|
+
"TableResult",
|
|
239
|
+
"Token",
|
|
240
|
+
"TokenDocument",
|
|
241
|
+
"ui",
|
|
242
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5etools-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Shared utilities for the 5etools ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/Api.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./lib/Api.js",
|
|
9
|
-
"./eslint": "./lib/eslint/eslint-plugin-jquery.js",
|
|
10
9
|
"./eslint/*": "./lib/eslint/*",
|
|
11
10
|
"./lib/*": "./lib/*",
|
|
12
11
|
"./schema/*": "./schema/*",
|
|
@@ -34,6 +33,7 @@
|
|
|
34
33
|
"test-img-file-sizes": "bin/test-img-file-sizes.js",
|
|
35
34
|
"test-img-source-names-brew": "bin/test-img-source-names-brew.js",
|
|
36
35
|
"test-img-source-names-ua": "bin/test-img-source-names-ua.js",
|
|
36
|
+
"vet-eslint": "bin/lint-js.js",
|
|
37
37
|
"lint-js-changed": "bin/lint-js-changed.js"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test": "npm run lint:js && npm run test:js",
|
|
43
43
|
"test:js": "node --disable-warning=ExperimentalWarning --localstorage-file test/localstorage.tmp --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
44
44
|
"lint": "npm run lint:js",
|
|
45
|
-
"lint:js": "
|
|
45
|
+
"lint:js": "node bin/lint-js.js lib node test --fix",
|
|
46
46
|
"lint:js:fast": "node bin/lint-js-changed.js",
|
|
47
47
|
"preversion": "npm t"
|
|
48
48
|
},
|
|
@@ -57,10 +57,12 @@
|
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://github.com/TheGiddyLimit/5etools-utils#readme",
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"@eslint/js": "^10.0.1",
|
|
60
61
|
"ajv": "^8.18.0",
|
|
61
62
|
"ajv-formats": "^3.0.1",
|
|
62
63
|
"commander": "^14.0.3",
|
|
63
|
-
"eslint": "^10.0
|
|
64
|
+
"eslint": "^10.10.0",
|
|
65
|
+
"globals": "^17.4.0",
|
|
64
66
|
"hasha": "^7.0.0",
|
|
65
67
|
"he": "^1.2.0",
|
|
66
68
|
"json-source-map": "^0.6.1",
|
|
@@ -69,7 +71,6 @@
|
|
|
69
71
|
"simple-git": "^3.36.0"
|
|
70
72
|
},
|
|
71
73
|
"devDependencies": {
|
|
72
|
-
"@eslint/js": "^10.0.1",
|
|
73
74
|
"jest": "^30.2.0"
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|
|
@@ -135,12 +135,16 @@
|
|
|
135
135
|
"LFL",
|
|
136
136
|
"EFA",
|
|
137
137
|
"FFotR",
|
|
138
|
+
"RHW",
|
|
139
|
+
"AU",
|
|
140
|
+
"AUD",
|
|
138
141
|
"TD",
|
|
139
142
|
"Screen",
|
|
140
143
|
"ScreenWildernessKit",
|
|
141
144
|
"ScreenDungeonKit",
|
|
142
145
|
"ScreenSpelljammer",
|
|
143
146
|
"XScreen",
|
|
147
|
+
"XScreenRHW",
|
|
144
148
|
"HF",
|
|
145
149
|
"HFFotM",
|
|
146
150
|
"HFStCM",
|
|
@@ -184,7 +188,9 @@
|
|
|
184
188
|
"MCV3MC",
|
|
185
189
|
"MCV4EC",
|
|
186
190
|
"MisMV1",
|
|
187
|
-
"AATM"
|
|
191
|
+
"AATM",
|
|
192
|
+
"CaBoMP",
|
|
193
|
+
"BQDD"
|
|
188
194
|
]
|
|
189
195
|
},
|
|
190
196
|
"sourcesLegacy": {
|
|
@@ -378,12 +384,18 @@
|
|
|
378
384
|
"LFL",
|
|
379
385
|
"EFA",
|
|
380
386
|
"FFotR",
|
|
387
|
+
"RHW",
|
|
388
|
+
"AU",
|
|
389
|
+
"AUD",
|
|
381
390
|
"XScreen",
|
|
391
|
+
"XScreenRHW",
|
|
382
392
|
"HFDoMM",
|
|
383
393
|
"UtHftLH",
|
|
384
394
|
"ScoEE",
|
|
385
395
|
"HBTD",
|
|
386
|
-
"BQGT"
|
|
396
|
+
"BQGT",
|
|
397
|
+
"CaBoMP",
|
|
398
|
+
"BQDD"
|
|
387
399
|
]
|
|
388
400
|
}
|
|
389
401
|
},
|