wikiplus-highlight 2.22.5 → 2.25.3

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 DELETED
@@ -1,675 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es6": true
5
- },
6
- "plugins": [
7
- "promise",
8
- "es-x",
9
- "regexp",
10
- "unicorn",
11
- "jsdoc"
12
- ],
13
- "extends": [
14
- "eslint:recommended",
15
- "plugin:promise/recommended",
16
- "plugin:es-x/no-new-in-es2019",
17
- "plugin:regexp/recommended",
18
- "plugin:unicorn/recommended"
19
- ],
20
- "parserOptions": {
21
- "ecmaVersion": 9,
22
- "sourceType": "script"
23
- },
24
- "globals": {
25
- "mw": "readonly",
26
- "$": "readonly",
27
- "CodeMirror": "readonly",
28
- "Wikiplus": "readonly",
29
- "OO": "readonly"
30
- },
31
- "ignorePatterns": [
32
- "*.min.js"
33
- ],
34
- "rules": {
35
- "array-callback-return": 2,
36
- "no-await-in-loop": 2,
37
- "no-cond-assign": [
38
- 2,
39
- "always"
40
- ],
41
- "no-constant-binary-expression": 2,
42
- "no-constructor-return": 2,
43
- "no-empty-character-class": 0,
44
- "no-fallthrough": 2,
45
- "no-import-assign": 0,
46
- "no-inner-declarations": [
47
- 2,
48
- "both"
49
- ],
50
- "no-irregular-whitespace": [
51
- 2,
52
- {
53
- "skipStrings": false
54
- }
55
- ],
56
- "no-promise-executor-return": 2,
57
- "no-self-compare": 2,
58
- "no-template-curly-in-string": 2,
59
- "no-undef": [
60
- 2,
61
- {
62
- "typeof": true
63
- }
64
- ],
65
- "no-unmodified-loop-condition": 2,
66
- "no-unreachable-loop": 2,
67
- "no-unsafe-negation": [
68
- 2,
69
- {
70
- "enforceForOrderingRelations": true
71
- }
72
- ],
73
- "no-unused-vars": [
74
- 2,
75
- {
76
- "ignoreRestSiblings": true
77
- }
78
- ],
79
- "no-use-before-define": [
80
- 2,
81
- {
82
- "functions": false,
83
- "variables": false
84
- }
85
- ],
86
- "require-atomic-updates": [
87
- 2,
88
- {
89
- "allowProperties": true
90
- }
91
- ],
92
- "use-isnan": [
93
- 2,
94
- {
95
- "enforceForIndexOf": true
96
- }
97
- ],
98
- "valid-typeof": [
99
- 2,
100
- {
101
- "requireStringLiterals": true
102
- }
103
- ],
104
- "accessor-pairs": 2,
105
- "arrow-body-style": 2,
106
- "block-scoped-var": 2,
107
- "camelcase": 2,
108
- "class-methods-use-this": 2,
109
- "consistent-return": 2,
110
- "consistent-this": 2,
111
- "curly": 2,
112
- "default-case": 2,
113
- "default-case-last": 2,
114
- "default-param-last": 2,
115
- "dot-notation":2,
116
- "eqeqeq": 2,
117
- "func-name-matching": [
118
- 2,
119
- {
120
- "considerPropertyDescriptor": true
121
- }
122
- ],
123
- "func-names": [
124
- 2,
125
- "never"
126
- ],
127
- "func-style": 2,
128
- "grouped-accessor-pairs": [
129
- 2,
130
- "getBeforeSet"
131
- ],
132
- "guard-for-in": 2,
133
- "multiline-comment-style": 2,
134
- "new-cap": [
135
- 2,
136
- {
137
- "capIsNew": false
138
- }
139
- ],
140
- "no-alert": 2,
141
- "no-array-constructor": 2,
142
- "no-bitwise": 2,
143
- "no-caller": 2,
144
- "no-else-return": 2,
145
- "no-empty": [
146
- 2,
147
- {
148
- "allowEmptyCatch": true
149
- }
150
- ],
151
- "no-empty-function": [
152
- 2,
153
- {
154
- "allow": [
155
- "arrowFunctions"
156
- ]
157
- }
158
- ],
159
- "no-eval": 2,
160
- "no-extend-native": 2,
161
- "no-extra-bind": 2,
162
- "no-extra-boolean-cast": [
163
- 2,
164
- {
165
- "enforceForLogicalOperands": true
166
- }
167
- ],
168
- "no-floating-decimal": 2,
169
- "no-implicit-coercion": 2,
170
- "no-implicit-globals": 2,
171
- "no-implied-eval": 2,
172
- "no-invalid-this": [
173
- 2,
174
- {
175
- "capIsConstructor": false
176
- }
177
- ],
178
- "no-lone-blocks": 2,
179
- "no-lonely-if": 2,
180
- "no-loop-func": 2,
181
- "no-multi-assign": 2,
182
- "no-multi-str": 2,
183
- "no-nested-ternary": 2,
184
- "no-new": 2,
185
- "no-new-func": 2,
186
- "no-new-object": 2,
187
- "no-new-wrappers": 2,
188
- "no-octal-escape": 2,
189
- "no-param-reassign": 2,
190
- "no-return-assign": [
191
- 2,
192
- "always"
193
- ],
194
- "no-return-await": 2,
195
- "no-script-url": 2,
196
- "no-sequences": [
197
- 2,
198
- {
199
- "allowInParentheses": false
200
- }
201
- ],
202
- "no-shadow": 2,
203
- "no-throw-literal": 2,
204
- "no-undef-init": 2,
205
- "no-underscore-dangle": [
206
- 2,
207
- {
208
- "allow": [
209
- "_"
210
- ],
211
- "enforceInMethodNames": true,
212
- "enforceInClassFields": true,
213
- "allowFunctionParams": false
214
- }
215
- ],
216
- "no-unneeded-ternary": [
217
- 2,
218
- {
219
- "defaultAssignment": false
220
- }
221
- ],
222
- "no-unused-expressions": 2,
223
- "no-useless-call": 2,
224
- "no-useless-computed-key": [
225
- 2,
226
- {
227
- "enforceForClassMembers": true
228
- }
229
- ],
230
- "no-useless-concat": 2,
231
- "no-useless-constructor": 2,
232
- "no-useless-return": 2,
233
- "no-var": 2,
234
- "no-void": 2,
235
- "object-shorthand": 2,
236
- "one-var-declaration-per-line": 2,
237
- "operator-assignment": 2,
238
- "prefer-arrow-callback": 2,
239
- "prefer-const": 2,
240
- "prefer-destructuring": [
241
- 2,
242
- {
243
- "VariableDeclarator": {
244
- "array": true,
245
- "object": true,
246
- "enforceForRenamedProperties": "literal"
247
- },
248
- "AssignmentExpression": {
249
- "array": true,
250
- "object": true
251
- }
252
- }
253
- ],
254
- "prefer-exponentiation-operator": 2,
255
- "prefer-numeric-literals": 2,
256
- "prefer-object-has-own": 2,
257
- "prefer-object-spread": 2,
258
- "prefer-regex-literals": [
259
- 2,
260
- {
261
- "disallowRedundantWrapping": true
262
- }
263
- ],
264
- "prefer-rest-params": 2,
265
- "prefer-spread": 2,
266
- "prefer-template": 2,
267
- "quote-props": [
268
- 2,
269
- "as-needed"
270
- ],
271
- "radix": [
272
- 2,
273
- "as-needed"
274
- ],
275
- "require-await": 2,
276
- "require-unicode-regexp": 2,
277
- "spaced-comment": 2,
278
- "strict": 2,
279
- "symbol-description": 2,
280
- "vars-on-top": 2,
281
- "yoda": 2,
282
- "array-bracket-newline": [
283
- 2,
284
- {
285
- "multiline": true
286
- }
287
- ],
288
- "array-bracket-spacing": 2,
289
- "array-element-newline": [
290
- 2,
291
- "consistent"
292
- ],
293
- "arrow-parens": [
294
- 2,
295
- "as-needed"
296
- ],
297
- "arrow-spacing": 2,
298
- "brace-style": 2,
299
- "block-spacing": 2,
300
- "comma-dangle": [
301
- 2,
302
- "always-multiline"
303
- ],
304
- "comma-spacing": 2,
305
- "comma-style": 2,
306
- "computed-property-spacing": 2,
307
- "dot-location": [
308
- 2,
309
- "property"
310
- ],
311
- "eol-last": 2,
312
- "func-call-spacing": 2,
313
- "function-call-argument-newline": [
314
- 2,
315
- "consistent"
316
- ],
317
- "function-paren-newline": [
318
- 2,
319
- "consistent"
320
- ],
321
- "indent": [
322
- 2,
323
- "tab",
324
- {
325
- "SwitchCase": 1
326
- }
327
- ],
328
- "key-spacing": 2,
329
- "keyword-spacing": 2,
330
- "linebreak-style": 2,
331
- "lines-around-comment": [
332
- 2,
333
- {
334
- "allowBlockStart": true,
335
- "ignorePattern": "^\\* @"
336
- }
337
- ],
338
- "lines-between-class-members": [
339
- 2,
340
- "always",
341
- {
342
- "exceptAfterSingleLine": true
343
- }
344
- ],
345
- "multiline-ternary": [
346
- 2,
347
- "always-multiline"
348
- ],
349
- "new-parens": 2,
350
- "newline-per-chained-call": [
351
- 2,
352
- {
353
- "ignoreChainWithDepth": 4
354
- }
355
- ],
356
- "no-extra-parens": 2,
357
- "no-multi-spaces": [
358
- 2,
359
- {
360
- "exceptions": {}
361
- }
362
- ],
363
- "no-multiple-empty-lines": [
364
- 2,
365
- {
366
- "max": 1,
367
- "maxBOF": 0
368
- }
369
- ],
370
- "no-trailing-spaces": 2,
371
- "no-whitespace-before-property": 2,
372
- "object-curly-newline": [
373
- 2,
374
- {
375
- "consistent": true
376
- }
377
- ],
378
- "object-curly-spacing": 2,
379
- "object-property-newline": [
380
- 2,
381
- {
382
- "allowAllPropertiesOnSameLine": true
383
- }
384
- ],
385
- "operator-linebreak": [
386
- 2,
387
- "before"
388
- ],
389
- "padded-blocks": [
390
- 2,
391
- "never"
392
- ],
393
- "quotes": [
394
- 2,
395
- "single",
396
- {
397
- "avoidEscape": true,
398
- "allowTemplateLiterals": true
399
- }
400
- ],
401
- "rest-spread-spacing": 2,
402
- "semi": 2,
403
- "semi-spacing": 2,
404
- "semi-style": 2,
405
- "space-before-blocks": 2,
406
- "space-before-function-paren": [
407
- 2,
408
- {
409
- "anonymous": "never",
410
- "named": "never",
411
- "asyncArrow": "always"
412
- }
413
- ],
414
- "space-in-parens": 2,
415
- "space-infix-ops": 2,
416
- "space-unary-ops": 2,
417
- "switch-colon-spacing": 2,
418
- "template-curly-spacing": 2,
419
- "wrap-iife": [
420
- 2,
421
- "inside"
422
- ],
423
- "promise/always-return": [
424
- 2,
425
- {
426
- "ignoreLastCallback": true
427
- }
428
- ],
429
- "promise/catch-or-return": [
430
- 2,
431
- {
432
- "allowThen": true
433
- }
434
- ],
435
- "promise/no-multiple-resolved": 2,
436
- "promise/prefer-await-to-then": 2,
437
- "es-x/no-regexp-lookbehind-assertions": 2,
438
- "regexp/no-contradiction-with-assertion": 2,
439
- "regexp/no-dupe-disjunctions": [
440
- 2,
441
- {
442
- "report": "interesting"
443
- }
444
- ],
445
- "regexp/no-empty-character-class": 2,
446
- "regexp/no-misleading-unicode-character": 2,
447
- "regexp/no-missing-g-flag": 2,
448
- "regexp/no-super-linear-backtracking": 2,
449
- "regexp/no-super-linear-move": 2,
450
- "regexp/no-extra-lookaround-assertions": 2,
451
- "regexp/no-octal": 2,
452
- "regexp/no-standalone-backslash": 2,
453
- "regexp/no-useless-character-class": [
454
- 2,
455
- {
456
- "ignores": []
457
- }
458
- ],
459
- "regexp/prefer-escape-replacement-dollar-char": 2,
460
- "regexp/prefer-quantifier": 2,
461
- "regexp/prefer-regexp-exec": 2,
462
- "regexp/prefer-regexp-test": 2,
463
- "regexp/use-ignore-case": 2,
464
- "regexp/hexadecimal-escape": 2,
465
- "regexp/letter-case": [
466
- 2,
467
- {
468
- "unicodeEscape": "uppercase",
469
- "hexadecimalEscape": "uppercase",
470
- "controlEscape": "uppercase"
471
- }
472
- ],
473
- "regexp/prefer-character-class": [
474
- 2,
475
- {
476
- "minAlternatives": 2
477
- }
478
- ],
479
- "regexp/prefer-lookaround": 2,
480
- "unicorn/better-regex": 0,
481
- "unicorn/catch-error-name": [
482
- 2,
483
- {
484
- "name": "e"
485
- }
486
- ],
487
- "unicorn/consistent-destructuring": [
488
- 2,
489
- {
490
- "exceptions": [
491
- "mw.loader",
492
- "mw.config",
493
- "mw.util",
494
- "mw.messages",
495
- "mw.addWikiEditor",
496
- "mw.libs",
497
- "$.wikiEditor"
498
- ]
499
- }
500
- ],
501
- "unicorn/escape-case": 0,
502
- "unicorn/expiring-todo-comments": 0,
503
- "unicorn/filename-case": 0,
504
- "unicorn/import-style": 0,
505
- "unicorn/no-array-callback-reference": 0,
506
- "unicorn/no-await-expression-member": 0,
507
- "unicorn/no-empty-file": 0,
508
- "unicorn/no-for-loop": 0,
509
- "unicorn/no-hex-escape": 0,
510
- "unicorn/no-nested-ternary": 0,
511
- "unicorn/no-new-array": 0,
512
- "unicorn/no-new-buffer": 0,
513
- "unicorn/no-null": 0,
514
- "unicorn/no-process-exit": 0,
515
- "unicorn/no-static-only-class": 0,
516
- "unicorn/no-thenable": 0,
517
- "unicorn/no-typeof-undefined": [
518
- 2,
519
- {
520
- "checkGlobalVariables": true
521
- }
522
- ],
523
- "unicorn/no-unreadable-array-destructuring": 0,
524
- "unicorn/no-unused-properties": 2,
525
- "unicorn/no-useless-undefined": 0,
526
- "unicorn/numeric-separators-style": 0,
527
- "unicorn/prefer-array-flat": 0,
528
- "unicorn/prefer-array-flat-map": 0,
529
- "unicorn/prefer-export-from": 0,
530
- "unicorn/prefer-math-trunc": 0,
531
- "unicorn/prefer-modern-math-apis": 0,
532
- "unicorn/prefer-module": 0,
533
- "unicorn/prefer-node-protocol": 0,
534
- "unicorn/prefer-number-properties": 0,
535
- "unicorn/prefer-object-from-entries": 0,
536
- "unicorn/prefer-optional-catch-binding": 0,
537
- "unicorn/prefer-regexp-test": 0,
538
- "unicorn/prefer-set-has": 0,
539
- "unicorn/prefer-set-size": 0,
540
- "unicorn/prefer-spread": [
541
- 2,
542
- {
543
- "concat": "certain"
544
- }
545
- ],
546
- "unicorn/prefer-string-slice": 0,
547
- "unicorn/prefer-string-trim-start-end": 0,
548
- "unicorn/prefer-top-level-await": 0,
549
- "unicorn/prefer-type-error": 0,
550
- "unicorn/prevent-abbreviations": 0,
551
- "unicorn/relative-url-style": [
552
- 2,
553
- "always"
554
- ],
555
- "unicorn/require-array-join-separator": 0,
556
- "unicorn/require-number-to-fixed-digits-argument": 0,
557
- "unicorn/switch-case-braces": [
558
- 2,
559
- "avoid"
560
- ],
561
- "unicorn/template-indent": 0,
562
- "jsdoc/check-alignment": 1,
563
- "jsdoc/check-indentation": 1,
564
- "jsdoc/check-property-names": 1,
565
- "jsdoc/check-tag-names": [
566
- 1,
567
- {
568
- "definedTags": [
569
- "template"
570
- ]
571
- }
572
- ],
573
- "jsdoc/check-types": 1,
574
- "jsdoc/multiline-blocks": 1,
575
- "jsdoc/newline-after-description": [
576
- 1,
577
- "never"
578
- ],
579
- "jsdoc/no-bad-blocks": [
580
- 1,
581
- {
582
- "preventAllMultiAsteriskBlocks": true
583
- }
584
- ],
585
- "jsdoc/no-multi-asterisks": 1,
586
- "jsdoc/require-asterisk-prefix": 1,
587
- "jsdoc/require-description": [
588
- 1,
589
- {
590
- "contexts": [
591
- "FunctionDeclaration",
592
- "VariableDeclarator > FunctionExpression",
593
- "MethodDefinition > FunctionExpression",
594
- "VariableDeclarator > ArrowFunctionExpression"
595
- ],
596
- "exemptedBy": [
597
- "type"
598
- ],
599
- "checkConstructors": false,
600
- "checkSetters": false
601
- }
602
- ],
603
- "jsdoc/require-hyphen-before-param-description": [
604
- 1,
605
- "never"
606
- ],
607
- "jsdoc/require-jsdoc": [
608
- 1,
609
- {
610
- "require": {
611
- "ArrowFunctionExpression": true,
612
- "ClassDeclaration": true,
613
- "FunctionDeclaration": true,
614
- "FunctionExpression": true,
615
- "MethodDefinition": true
616
- },
617
- "exemptEmptyConstructors": true,
618
- "checkGetters": true,
619
- "checkSetters": "no-getter"
620
- }
621
- ],
622
- "jsdoc/require-param-description": [
623
- 1,
624
- {
625
- "contexts": [
626
- "FunctionDeclaration",
627
- "VariableDeclarator > FunctionExpression",
628
- "MethodDefinition > FunctionExpression",
629
- "VariableDeclarator > ArrowFunctionExpression"
630
- ],
631
- "exceptions": [
632
- "cm"
633
- ]
634
- }
635
- ],
636
- "jsdoc/require-param-name": [
637
- 1,
638
- {
639
- "contexts": [
640
- "FunctionDeclaration",
641
- "VariableDeclarator > FunctionExpression",
642
- "MethodDefinition > FunctionExpression",
643
- "VariableDeclarator > ArrowFunctionExpression"
644
- ]
645
- }
646
- ],
647
- "jsdoc/require-param-type": 1,
648
- "jsdoc/require-param": [
649
- 1,
650
- {
651
- "exceptions": [
652
- "_"
653
- ],
654
- "contexts": [
655
- "FunctionDeclaration",
656
- "VariableDeclarator > FunctionExpression",
657
- "MethodDefinition > FunctionExpression",
658
- "VariableDeclarator > ArrowFunctionExpression"
659
- ]
660
- }
661
- ],
662
- "jsdoc/require-property": 1,
663
- "jsdoc/require-property-description": 1,
664
- "jsdoc/require-property-name": 1,
665
- "jsdoc/require-property-type": 1,
666
- "jsdoc/require-returns-check": [
667
- 1,
668
- {
669
- "exemptAsync": false
670
- }
671
- ],
672
- "jsdoc/require-returns-type": 1,
673
- "jsdoc/require-throws": 1
674
- }
675
- }
package/bump.sh DELETED
@@ -1,24 +0,0 @@
1
- #!/usr/local/bin/bash
2
- if [[ $2 == 'npm' ]]
3
- then
4
- sed -i '' 's|gh/bhsd-harry/Wikiplus-highlight@|npm/wikiplus-highlight@|' main.js
5
- uglifyjs main.js -c -m --comments --source-map 'url=main.min.js.map,root="../"' -o dist/main.min.js
6
- perl -pi -e "s|wikiplus-highlight@\d+\..+?(['/])|wikiplus-highlight\@$1\$1|" README.md
7
- sed -i '' -E "s/\"version\": \".+\"/\"version\": \"$1\"/" package.json
8
- git add -A
9
- git commit -m "chore: publish $1 to npm"
10
- git push
11
- npm publish
12
- else
13
- sed -i '' -E "s/version = '.+'/version = '$1'/" main.js
14
- sed -i '' 's|npm/wikiplus-highlight@|gh/bhsd-harry/Wikiplus-highlight@|' main.js
15
- for file in i18n/*
16
- do
17
- sed -i '' -E "s/\"wphl-version\": \".+\"/\"wphl-version\": \"$1\"/" $file
18
- done
19
- git add -A
20
- git commit -m "chore: bump version to $1"
21
- git push
22
- git tag $1
23
- git push origin $1
24
- fi
package/jsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018"
4
- },
5
- "typeAcquisition": {
6
- "include": [
7
- "jquery",
8
- "codemirror"
9
- ]
10
- }
11
- }