wikiparser-node 0.3.1 → 0.4.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/.eslintrc.json +446 -51
- package/README.md +1 -1
- package/config/default.json +13 -17
- package/config/llwiki.json +11 -79
- package/config/moegirl.json +7 -1
- package/config/zhwiki.json +1269 -0
- package/index.js +106 -96
- package/lib/element.js +448 -440
- package/lib/node.js +335 -115
- package/lib/ranges.js +27 -18
- package/lib/text.js +146 -0
- package/lib/title.js +13 -5
- package/mixin/attributeParent.js +70 -24
- package/mixin/fixedToken.js +14 -6
- package/mixin/hidden.js +6 -4
- package/mixin/sol.js +27 -10
- package/package.json +7 -4
- package/parser/brackets.js +18 -18
- package/parser/commentAndExt.js +15 -13
- package/parser/converter.js +14 -13
- package/parser/externalLinks.js +12 -11
- package/parser/hrAndDoubleUnderscore.js +23 -14
- package/parser/html.js +8 -7
- package/parser/links.js +13 -12
- package/parser/list.js +12 -11
- package/parser/magicLinks.js +11 -10
- package/parser/quotes.js +6 -5
- package/parser/selector.js +175 -0
- package/parser/table.js +24 -17
- package/printed/example.json +120 -0
- package/src/arg.js +56 -32
- package/src/atom/hidden.js +5 -2
- package/src/atom/index.js +17 -9
- package/src/attribute.js +180 -98
- package/src/converter.js +68 -41
- package/src/converterFlags.js +63 -41
- package/src/converterRule.js +117 -65
- package/src/extLink.js +66 -18
- package/src/gallery.js +28 -16
- package/src/heading.js +33 -14
- package/src/html.js +97 -35
- package/src/imageParameter.js +82 -53
- package/src/index.js +296 -175
- package/src/link/category.js +20 -52
- package/src/link/file.js +59 -28
- package/src/link/galleryImage.js +21 -7
- package/src/link/index.js +143 -57
- package/src/magicLink.js +33 -11
- package/src/nowiki/comment.js +22 -10
- package/src/nowiki/dd.js +37 -22
- package/src/nowiki/doubleUnderscore.js +16 -7
- package/src/nowiki/hr.js +11 -7
- package/src/nowiki/index.js +16 -9
- package/src/nowiki/list.js +2 -2
- package/src/nowiki/noinclude.js +8 -4
- package/src/nowiki/quote.js +11 -7
- package/src/onlyinclude.js +19 -7
- package/src/parameter.js +65 -38
- package/src/syntax.js +23 -20
- package/src/table/index.js +260 -165
- package/src/table/td.js +97 -52
- package/src/table/tr.js +102 -58
- package/src/tagPair/ext.js +27 -19
- package/src/tagPair/include.js +16 -11
- package/src/tagPair/index.js +64 -29
- package/src/transclude.js +167 -92
- package/test/api.js +83 -0
- package/test/real.js +133 -0
- package/test/test.js +28 -0
- package/test/util.js +80 -0
- package/tool/index.js +41 -31
- package/typings/api.d.ts +13 -0
- package/typings/array.d.ts +28 -0
- package/typings/event.d.ts +24 -0
- package/typings/index.d.ts +46 -4
- package/typings/node.d.ts +15 -9
- package/typings/parser.d.ts +7 -0
- package/typings/tool.d.ts +3 -2
- package/util/debug.js +21 -18
- package/util/string.js +38 -25
- package/typings/element.d.ts +0 -28
package/.eslintrc.json
CHANGED
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"env": {
|
|
3
3
|
"node": true,
|
|
4
|
-
"
|
|
4
|
+
"es2022": true
|
|
5
5
|
},
|
|
6
6
|
"plugins": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"regexp",
|
|
8
|
+
"unicorn",
|
|
9
|
+
"jsdoc"
|
|
9
10
|
],
|
|
10
11
|
"extends": [
|
|
11
12
|
"eslint:recommended",
|
|
12
|
-
"plugin:promise/recommended",
|
|
13
13
|
"plugin:n/recommended-script",
|
|
14
|
-
"plugin:regexp/recommended"
|
|
14
|
+
"plugin:regexp/recommended",
|
|
15
|
+
"plugin:unicorn/recommended"
|
|
15
16
|
],
|
|
16
17
|
"parserOptions": {
|
|
17
|
-
"ecmaVersion": 13
|
|
18
|
+
"ecmaVersion": 13,
|
|
19
|
+
"sourceType": "script"
|
|
18
20
|
},
|
|
21
|
+
"ignorePatterns": [
|
|
22
|
+
"tool/*.js"
|
|
23
|
+
],
|
|
19
24
|
"rules": {
|
|
20
|
-
"array-callback-return":
|
|
25
|
+
"array-callback-return": 2,
|
|
26
|
+
"no-cond-assign": [
|
|
21
27
|
2,
|
|
22
|
-
|
|
23
|
-
"checkForEach": true
|
|
24
|
-
}
|
|
28
|
+
"always"
|
|
25
29
|
],
|
|
26
|
-
"no-await-in-loop": 2,
|
|
27
30
|
"no-constant-binary-expression": 2,
|
|
28
31
|
"no-constructor-return": 2,
|
|
29
|
-
"no-
|
|
30
|
-
"no-
|
|
32
|
+
"no-control-regex": 0,
|
|
33
|
+
"no-empty-character-class": 0,
|
|
34
|
+
"no-fallthrough": 2,
|
|
35
|
+
"no-import-assign": 0,
|
|
36
|
+
"no-inner-declarations": [
|
|
37
|
+
2,
|
|
38
|
+
"both"
|
|
39
|
+
],
|
|
40
|
+
"no-irregular-whitespace": [
|
|
41
|
+
2,
|
|
42
|
+
{
|
|
43
|
+
"skipStrings": false
|
|
44
|
+
}
|
|
45
|
+
],
|
|
31
46
|
"no-self-compare": 2,
|
|
32
47
|
"no-template-curly-in-string": 2,
|
|
33
48
|
"no-undef": [
|
|
@@ -50,10 +65,12 @@
|
|
|
50
65
|
"disallowArithmeticOperators": true
|
|
51
66
|
}
|
|
52
67
|
],
|
|
68
|
+
"no-unused-private-class-members": 2,
|
|
53
69
|
"no-unused-vars": [
|
|
54
70
|
2,
|
|
55
71
|
{
|
|
56
|
-
"varsIgnorePattern": "
|
|
72
|
+
"varsIgnorePattern": "^(?:Ast\\w*|\\w*Token|Title)$",
|
|
73
|
+
"caughtErrors": "all",
|
|
57
74
|
"ignoreRestSiblings": true
|
|
58
75
|
}
|
|
59
76
|
],
|
|
@@ -61,7 +78,6 @@
|
|
|
61
78
|
2,
|
|
62
79
|
{
|
|
63
80
|
"functions": false,
|
|
64
|
-
"classes": false,
|
|
65
81
|
"variables": false
|
|
66
82
|
}
|
|
67
83
|
],
|
|
@@ -71,8 +87,33 @@
|
|
|
71
87
|
"allowProperties": true
|
|
72
88
|
}
|
|
73
89
|
],
|
|
90
|
+
"use-isnan": [
|
|
91
|
+
2,
|
|
92
|
+
{
|
|
93
|
+
"enforceForIndexOf": true
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"valid-typeof": [
|
|
97
|
+
2,
|
|
98
|
+
{
|
|
99
|
+
"requireStringLiterals": true
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"accessor-pairs": 2,
|
|
103
|
+
"arrow-body-style": 2,
|
|
74
104
|
"block-scoped-var": 2,
|
|
75
|
-
"
|
|
105
|
+
"camelcase": 2,
|
|
106
|
+
"class-methods-use-this": [
|
|
107
|
+
2,
|
|
108
|
+
{
|
|
109
|
+
"exceptMethods": [
|
|
110
|
+
"getPadding",
|
|
111
|
+
"getGaps",
|
|
112
|
+
"isPlain"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"consistent-return": 2,
|
|
76
117
|
"consistent-this": 2,
|
|
77
118
|
"curly": 2,
|
|
78
119
|
"default-case": 2,
|
|
@@ -80,10 +121,22 @@
|
|
|
80
121
|
"default-param-last": 2,
|
|
81
122
|
"dot-notation":2,
|
|
82
123
|
"eqeqeq": 2,
|
|
124
|
+
"func-name-matching": [
|
|
125
|
+
2,
|
|
126
|
+
{
|
|
127
|
+
"considerPropertyDescriptor": true
|
|
128
|
+
}
|
|
129
|
+
],
|
|
83
130
|
"func-names": [
|
|
84
131
|
2,
|
|
85
132
|
"never"
|
|
86
133
|
],
|
|
134
|
+
"func-style": 2,
|
|
135
|
+
"grouped-accessor-pairs": [
|
|
136
|
+
2,
|
|
137
|
+
"getBeforeSet"
|
|
138
|
+
],
|
|
139
|
+
"guard-for-in": 2,
|
|
87
140
|
"logical-assignment-operators": [
|
|
88
141
|
2,
|
|
89
142
|
"always",
|
|
@@ -93,15 +146,14 @@
|
|
|
93
146
|
],
|
|
94
147
|
"multiline-comment-style": 2,
|
|
95
148
|
"new-cap": [
|
|
96
|
-
|
|
149
|
+
2,
|
|
97
150
|
{
|
|
98
|
-
"
|
|
151
|
+
"newIsCap": false
|
|
99
152
|
}
|
|
100
153
|
],
|
|
101
|
-
"no-alert": 2,
|
|
102
154
|
"no-array-constructor": 2,
|
|
103
155
|
"no-bitwise": 2,
|
|
104
|
-
"no-
|
|
156
|
+
"no-caller": 2,
|
|
105
157
|
"no-else-return": 2,
|
|
106
158
|
"no-empty": [
|
|
107
159
|
2,
|
|
@@ -109,8 +161,18 @@
|
|
|
109
161
|
"allowEmptyCatch": true
|
|
110
162
|
}
|
|
111
163
|
],
|
|
164
|
+
"no-empty-function": [
|
|
165
|
+
2,
|
|
166
|
+
{
|
|
167
|
+
"allow": [
|
|
168
|
+
"arrowFunctions"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"no-empty-static-block": 2,
|
|
112
173
|
"no-eval": 2,
|
|
113
174
|
"no-extend-native": 2,
|
|
175
|
+
"no-extra-bind": 2,
|
|
114
176
|
"no-extra-boolean-cast": [
|
|
115
177
|
2,
|
|
116
178
|
{
|
|
@@ -118,6 +180,8 @@
|
|
|
118
180
|
}
|
|
119
181
|
],
|
|
120
182
|
"no-floating-decimal": 2,
|
|
183
|
+
"no-implicit-coercion": 2,
|
|
184
|
+
"no-implicit-globals": 2,
|
|
121
185
|
"no-implied-eval": 2,
|
|
122
186
|
"no-invalid-this": [
|
|
123
187
|
2,
|
|
@@ -130,27 +194,38 @@
|
|
|
130
194
|
"no-loop-func": 2,
|
|
131
195
|
"no-multi-assign": 2,
|
|
132
196
|
"no-multi-str": 2,
|
|
133
|
-
"no-nested-ternary":
|
|
197
|
+
"no-nested-ternary": 2,
|
|
134
198
|
"no-new": 0,
|
|
135
199
|
"no-new-func": 2,
|
|
136
200
|
"no-new-object": 2,
|
|
137
201
|
"no-new-wrappers": 2,
|
|
138
202
|
"no-octal-escape": 2,
|
|
139
|
-
"no-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"no-
|
|
144
|
-
"no-
|
|
203
|
+
"no-return-assign": [
|
|
204
|
+
2,
|
|
205
|
+
"always"
|
|
206
|
+
],
|
|
207
|
+
"no-return-await": 0,
|
|
208
|
+
"no-sequences": [
|
|
145
209
|
2,
|
|
146
210
|
{
|
|
147
|
-
"
|
|
148
|
-
"allow": [
|
|
149
|
-
"root"
|
|
150
|
-
]
|
|
211
|
+
"allowInParentheses": false
|
|
151
212
|
}
|
|
152
213
|
],
|
|
214
|
+
"no-shadow": 2,
|
|
215
|
+
"no-throw-literal": 2,
|
|
153
216
|
"no-undef-init": 2,
|
|
217
|
+
"no-underscore-dangle": [
|
|
218
|
+
2,
|
|
219
|
+
{
|
|
220
|
+
"allow": [
|
|
221
|
+
"_",
|
|
222
|
+
"__"
|
|
223
|
+
],
|
|
224
|
+
"enforceInMethodNames": true,
|
|
225
|
+
"enforceInClassFields": true,
|
|
226
|
+
"allowFunctionParams": false
|
|
227
|
+
}
|
|
228
|
+
],
|
|
154
229
|
"no-unneeded-ternary": [
|
|
155
230
|
2,
|
|
156
231
|
{
|
|
@@ -158,6 +233,7 @@
|
|
|
158
233
|
}
|
|
159
234
|
],
|
|
160
235
|
"no-unused-expressions": 2,
|
|
236
|
+
"no-useless-call": 2,
|
|
161
237
|
"no-useless-computed-key": [
|
|
162
238
|
2,
|
|
163
239
|
{
|
|
@@ -166,7 +242,6 @@
|
|
|
166
242
|
],
|
|
167
243
|
"no-useless-concat": 2,
|
|
168
244
|
"no-useless-constructor": 2,
|
|
169
|
-
"no-useless-rename": 2,
|
|
170
245
|
"no-useless-return": 2,
|
|
171
246
|
"no-var": 2,
|
|
172
247
|
"no-void": 2,
|
|
@@ -175,8 +250,23 @@
|
|
|
175
250
|
"operator-assignment": 2,
|
|
176
251
|
"prefer-arrow-callback": 2,
|
|
177
252
|
"prefer-const": 2,
|
|
178
|
-
"prefer-destructuring":
|
|
253
|
+
"prefer-destructuring": [
|
|
254
|
+
2,
|
|
255
|
+
{
|
|
256
|
+
"VariableDeclarator": {
|
|
257
|
+
"array": true,
|
|
258
|
+
"object": true,
|
|
259
|
+
"enforceForRenamedProperties": "literal"
|
|
260
|
+
},
|
|
261
|
+
"AssignmentExpression": {
|
|
262
|
+
"array": true,
|
|
263
|
+
"object": true
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
],
|
|
179
267
|
"prefer-exponentiation-operator": 2,
|
|
268
|
+
"prefer-numeric-literals": 2,
|
|
269
|
+
"prefer-object-has-own": 2,
|
|
180
270
|
"prefer-object-spread": 2,
|
|
181
271
|
"prefer-regex-literals": [
|
|
182
272
|
2,
|
|
@@ -186,7 +276,7 @@
|
|
|
186
276
|
],
|
|
187
277
|
"prefer-rest-params": 2,
|
|
188
278
|
"prefer-spread": 2,
|
|
189
|
-
"prefer-template":
|
|
279
|
+
"prefer-template": 2,
|
|
190
280
|
"quote-props": [
|
|
191
281
|
2,
|
|
192
282
|
"as-needed"
|
|
@@ -195,19 +285,31 @@
|
|
|
195
285
|
2,
|
|
196
286
|
"as-needed"
|
|
197
287
|
],
|
|
198
|
-
"require-await":
|
|
288
|
+
"require-await": 0,
|
|
289
|
+
"require-unicode-regexp": 2,
|
|
199
290
|
"spaced-comment": 2,
|
|
200
291
|
"strict": 2,
|
|
201
292
|
"symbol-description": 2,
|
|
293
|
+
"vars-on-top": 2,
|
|
202
294
|
"yoda": 2,
|
|
295
|
+
"array-bracket-newline": [
|
|
296
|
+
2,
|
|
297
|
+
{
|
|
298
|
+
"multiline": true
|
|
299
|
+
}
|
|
300
|
+
],
|
|
203
301
|
"array-bracket-spacing": 2,
|
|
302
|
+
"array-element-newline": [
|
|
303
|
+
2,
|
|
304
|
+
"consistent"
|
|
305
|
+
],
|
|
204
306
|
"arrow-parens": [
|
|
205
307
|
2,
|
|
206
308
|
"as-needed"
|
|
207
309
|
],
|
|
208
310
|
"arrow-spacing": 2,
|
|
209
|
-
"block-spacing": 2,
|
|
210
311
|
"brace-style": 2,
|
|
312
|
+
"block-spacing": 2,
|
|
211
313
|
"comma-dangle": [
|
|
212
314
|
2,
|
|
213
315
|
"always-multiline"
|
|
@@ -221,6 +323,14 @@
|
|
|
221
323
|
],
|
|
222
324
|
"eol-last": 2,
|
|
223
325
|
"func-call-spacing": 2,
|
|
326
|
+
"function-call-argument-newline": [
|
|
327
|
+
2,
|
|
328
|
+
"consistent"
|
|
329
|
+
],
|
|
330
|
+
"function-paren-newline": [
|
|
331
|
+
2,
|
|
332
|
+
"consistent"
|
|
333
|
+
],
|
|
224
334
|
"indent": [
|
|
225
335
|
2,
|
|
226
336
|
"tab",
|
|
@@ -231,21 +341,60 @@
|
|
|
231
341
|
"key-spacing": 2,
|
|
232
342
|
"keyword-spacing": 2,
|
|
233
343
|
"linebreak-style": 2,
|
|
344
|
+
"lines-around-comment": [
|
|
345
|
+
2,
|
|
346
|
+
{
|
|
347
|
+
"allowBlockStart": true,
|
|
348
|
+
"ignorePattern": "^\\* @"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"lines-between-class-members": [
|
|
352
|
+
2,
|
|
353
|
+
"always",
|
|
354
|
+
{
|
|
355
|
+
"exceptAfterSingleLine": true
|
|
356
|
+
}
|
|
357
|
+
],
|
|
234
358
|
"multiline-ternary": [
|
|
235
359
|
2,
|
|
236
360
|
"always-multiline"
|
|
237
361
|
],
|
|
238
362
|
"new-parens": 2,
|
|
363
|
+
"newline-per-chained-call": [
|
|
364
|
+
2,
|
|
365
|
+
{
|
|
366
|
+
"ignoreChainWithDepth": 3
|
|
367
|
+
}
|
|
368
|
+
],
|
|
239
369
|
"no-extra-parens": 2,
|
|
240
|
-
"no-multi-spaces":
|
|
370
|
+
"no-multi-spaces": [
|
|
371
|
+
2,
|
|
372
|
+
{
|
|
373
|
+
"exceptions": {}
|
|
374
|
+
}
|
|
375
|
+
],
|
|
241
376
|
"no-multiple-empty-lines": [
|
|
242
377
|
2,
|
|
243
378
|
{
|
|
244
|
-
"max": 1
|
|
379
|
+
"max": 1,
|
|
380
|
+
"maxBOF": 0
|
|
245
381
|
}
|
|
246
382
|
],
|
|
247
383
|
"no-trailing-spaces": 2,
|
|
248
384
|
"no-whitespace-before-property": 2,
|
|
385
|
+
"object-curly-newline": [
|
|
386
|
+
2,
|
|
387
|
+
{
|
|
388
|
+
"consistent": true
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"object-curly-spacing": 2,
|
|
392
|
+
"object-property-newline": [
|
|
393
|
+
2,
|
|
394
|
+
{
|
|
395
|
+
"allowAllPropertiesOnSameLine": true
|
|
396
|
+
}
|
|
397
|
+
],
|
|
249
398
|
"operator-linebreak": [
|
|
250
399
|
2,
|
|
251
400
|
"before"
|
|
@@ -284,36 +433,282 @@
|
|
|
284
433
|
2,
|
|
285
434
|
"inside"
|
|
286
435
|
],
|
|
287
|
-
"
|
|
436
|
+
"n/no-extraneous-import": 0,
|
|
437
|
+
"n/no-missing-import": 0,
|
|
438
|
+
"n/no-new-require": 2,
|
|
439
|
+
"n/no-path-concat": 2,
|
|
440
|
+
"n/no-unpublished-bin": 0,
|
|
441
|
+
"n/no-unpublished-import": 0,
|
|
442
|
+
"n/no-unpublished-require": 0,
|
|
443
|
+
"n/shebang": 0,
|
|
288
444
|
"n/exports-style": [
|
|
289
445
|
2,
|
|
290
446
|
"module.exports"
|
|
291
447
|
],
|
|
292
|
-
"n/no-
|
|
293
|
-
"n/no-missing-require": 2,
|
|
448
|
+
"n/no-mixed-requires": 2,
|
|
294
449
|
"regexp/no-contradiction-with-assertion": 2,
|
|
295
|
-
"regexp/no-
|
|
296
|
-
"regexp/no-super-linear-backtracking": [
|
|
450
|
+
"regexp/no-dupe-disjunctions": [
|
|
297
451
|
2,
|
|
298
452
|
{
|
|
299
|
-
"report": "
|
|
453
|
+
"report": "interesting"
|
|
300
454
|
}
|
|
301
455
|
],
|
|
302
|
-
"regexp/no-
|
|
456
|
+
"regexp/no-empty-character-class": 2,
|
|
457
|
+
"regexp/no-misleading-unicode-character": 2,
|
|
458
|
+
"regexp/no-missing-g-flag": 2,
|
|
459
|
+
"regexp/no-super-linear-backtracking": 2,
|
|
460
|
+
"regexp/no-super-linear-move": 2,
|
|
461
|
+
"regexp/no-extra-lookaround-assertions": 2,
|
|
462
|
+
"regexp/no-octal": 2,
|
|
463
|
+
"regexp/no-standalone-backslash": 2,
|
|
464
|
+
"regexp/no-useless-character-class": [
|
|
303
465
|
2,
|
|
304
466
|
{
|
|
305
|
-
"
|
|
467
|
+
"ignores": []
|
|
306
468
|
}
|
|
307
469
|
],
|
|
308
|
-
"regexp/no-extra-lookaround-assertions": 2,
|
|
309
|
-
"regexp/no-octal": 2,
|
|
310
|
-
"regexp/no-standalone-backslash": 2,
|
|
311
470
|
"regexp/prefer-escape-replacement-dollar-char": 2,
|
|
312
471
|
"regexp/prefer-quantifier": 2,
|
|
313
472
|
"regexp/prefer-regexp-test": 2,
|
|
314
473
|
"regexp/use-ignore-case": 2,
|
|
315
474
|
"regexp/hexadecimal-escape": 2,
|
|
316
|
-
"regexp/letter-case":
|
|
317
|
-
|
|
475
|
+
"regexp/letter-case": [
|
|
476
|
+
2,
|
|
477
|
+
{
|
|
478
|
+
"unicodeEscape": "uppercase",
|
|
479
|
+
"hexadecimalEscape": "uppercase",
|
|
480
|
+
"controlEscape": "uppercase"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"regexp/prefer-character-class": [
|
|
484
|
+
2,
|
|
485
|
+
{
|
|
486
|
+
"minAlternatives": 2
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"regexp/prefer-lookaround": 2,
|
|
490
|
+
"unicorn/better-regex": 0,
|
|
491
|
+
"unicorn/catch-error-name": [
|
|
492
|
+
2,
|
|
493
|
+
{
|
|
494
|
+
"name": "e"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"unicorn/consistent-destructuring": [
|
|
498
|
+
2,
|
|
499
|
+
{
|
|
500
|
+
"exceptions": [
|
|
501
|
+
"Parser.running",
|
|
502
|
+
"Parser.debugging",
|
|
503
|
+
"Parser.warning",
|
|
504
|
+
"Parser.classes"
|
|
505
|
+
]
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"unicorn/escape-case": 0,
|
|
509
|
+
"unicorn/expiring-todo-comments": 0,
|
|
510
|
+
"unicorn/filename-case": [
|
|
511
|
+
2,
|
|
512
|
+
{
|
|
513
|
+
"case": "camelCase"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"unicorn/import-style": 0,
|
|
517
|
+
"unicorn/no-array-callback-reference": 0,
|
|
518
|
+
"unicorn/no-await-expression-member": 0,
|
|
519
|
+
"unicorn/no-document-cookie": 0,
|
|
520
|
+
"unicorn/no-empty-file": 0,
|
|
521
|
+
"unicorn/no-for-loop": 0,
|
|
522
|
+
"unicorn/no-hex-escape": 0,
|
|
523
|
+
"unicorn/no-invalid-remove-event-listener": 0,
|
|
524
|
+
"unicorn/no-nested-ternary": 0,
|
|
525
|
+
"unicorn/no-new-array": 0,
|
|
526
|
+
"unicorn/no-null": 0,
|
|
527
|
+
"unicorn/no-process-exit": 0,
|
|
528
|
+
"unicorn/no-thenable": 0,
|
|
529
|
+
"unicorn/no-typeof-undefined": [
|
|
530
|
+
2,
|
|
531
|
+
{
|
|
532
|
+
"checkGlobalVariables": true
|
|
533
|
+
}
|
|
534
|
+
],
|
|
535
|
+
"unicorn/no-unreadable-array-destructuring": 0,
|
|
536
|
+
"unicorn/no-unused-properties": 2,
|
|
537
|
+
"unicorn/no-useless-undefined": 0,
|
|
538
|
+
"unicorn/prefer-add-event-listener": 0,
|
|
539
|
+
"unicorn/prefer-array-find": [
|
|
540
|
+
2,
|
|
541
|
+
{
|
|
542
|
+
"checkFromLast": true
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"unicorn/prefer-at": 2,
|
|
546
|
+
"unicorn/prefer-dom-node-append": 0,
|
|
547
|
+
"unicorn/prefer-dom-node-dataset": 0,
|
|
548
|
+
"unicorn/prefer-dom-node-remove": 0,
|
|
549
|
+
"unicorn/prefer-dom-node-text-content": 0,
|
|
550
|
+
"unicorn/prefer-export-from": 0,
|
|
551
|
+
"unicorn/prefer-keyboard-event-key": 0,
|
|
552
|
+
"unicorn/prefer-math-trunc": 0,
|
|
553
|
+
"unicorn/prefer-modern-dom-apis": 0,
|
|
554
|
+
"unicorn/prefer-modern-math-apis": 0,
|
|
555
|
+
"unicorn/prefer-module": 0,
|
|
556
|
+
"unicorn/prefer-node-protocol": 0,
|
|
557
|
+
"unicorn/prefer-number-properties": 0,
|
|
558
|
+
"unicorn/prefer-object-from-entries": 0,
|
|
559
|
+
"unicorn/prefer-query-selector": 0,
|
|
560
|
+
"unicorn/prefer-regexp-test": 0,
|
|
561
|
+
"unicorn/prefer-set-has": 0,
|
|
562
|
+
"unicorn/prefer-set-size": 0,
|
|
563
|
+
"unicorn/prefer-spread": [
|
|
564
|
+
2,
|
|
565
|
+
{
|
|
566
|
+
"concat": "certain"
|
|
567
|
+
}
|
|
568
|
+
],
|
|
569
|
+
"unicorn/prefer-string-replace-all": 2,
|
|
570
|
+
"unicorn/prefer-string-slice": 0,
|
|
571
|
+
"unicorn/prefer-string-trim-start-end": 0,
|
|
572
|
+
"unicorn/prefer-top-level-await": 0,
|
|
573
|
+
"unicorn/prefer-type-error": 0,
|
|
574
|
+
"unicorn/prevent-abbreviations": 0,
|
|
575
|
+
"unicorn/relative-url-style": 0,
|
|
576
|
+
"unicorn/require-array-join-separator": 0,
|
|
577
|
+
"unicorn/require-number-to-fixed-digits-argument": 0,
|
|
578
|
+
"unicorn/switch-case-braces": [
|
|
579
|
+
2,
|
|
580
|
+
"avoid"
|
|
581
|
+
],
|
|
582
|
+
"unicorn/template-indent": 0,
|
|
583
|
+
"jsdoc/check-alignment": 1,
|
|
584
|
+
"jsdoc/check-indentation": 1,
|
|
585
|
+
"jsdoc/check-tag-names": [
|
|
586
|
+
1,
|
|
587
|
+
{
|
|
588
|
+
"definedTags": [
|
|
589
|
+
"template",
|
|
590
|
+
"complexity"
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
"jsdoc/check-types": 1,
|
|
595
|
+
"jsdoc/multiline-blocks": 1,
|
|
596
|
+
"jsdoc/newline-after-description": [
|
|
597
|
+
1,
|
|
598
|
+
"never"
|
|
599
|
+
],
|
|
600
|
+
"jsdoc/no-bad-blocks": [
|
|
601
|
+
1,
|
|
602
|
+
{
|
|
603
|
+
"preventAllMultiAsteriskBlocks": true
|
|
604
|
+
}
|
|
605
|
+
],
|
|
606
|
+
"jsdoc/no-multi-asterisks": 1,
|
|
607
|
+
"jsdoc/require-asterisk-prefix": 1,
|
|
608
|
+
"jsdoc/require-description": [
|
|
609
|
+
1,
|
|
610
|
+
{
|
|
611
|
+
"contexts": [
|
|
612
|
+
"FunctionDeclaration",
|
|
613
|
+
"VariableDeclarator > FunctionExpression",
|
|
614
|
+
"MethodDefinition > FunctionExpression",
|
|
615
|
+
"VariableDeclarator > ArrowFunctionExpression"
|
|
616
|
+
],
|
|
617
|
+
"exemptedBy": [
|
|
618
|
+
"type"
|
|
619
|
+
],
|
|
620
|
+
"checkConstructors": false,
|
|
621
|
+
"checkSetters": false
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"jsdoc/require-hyphen-before-param-description": [
|
|
625
|
+
1,
|
|
626
|
+
"never"
|
|
627
|
+
],
|
|
628
|
+
"jsdoc/require-jsdoc": [
|
|
629
|
+
1,
|
|
630
|
+
{
|
|
631
|
+
"require": {
|
|
632
|
+
"ArrowFunctionExpression": true,
|
|
633
|
+
"ClassDeclaration": true,
|
|
634
|
+
"FunctionDeclaration": true,
|
|
635
|
+
"FunctionExpression": true,
|
|
636
|
+
"MethodDefinition": true
|
|
637
|
+
},
|
|
638
|
+
"exemptEmptyConstructors": true,
|
|
639
|
+
"checkGetters": true,
|
|
640
|
+
"checkSetters": "no-getter"
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"jsdoc/require-param-description": [
|
|
644
|
+
1,
|
|
645
|
+
{
|
|
646
|
+
"exceptions": [
|
|
647
|
+
"accum",
|
|
648
|
+
"selector",
|
|
649
|
+
"callback"
|
|
650
|
+
],
|
|
651
|
+
"contexts": [
|
|
652
|
+
"FunctionDeclaration",
|
|
653
|
+
"VariableDeclarator > FunctionExpression",
|
|
654
|
+
"MethodDefinition > FunctionExpression",
|
|
655
|
+
"VariableDeclarator > ArrowFunctionExpression"
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
],
|
|
659
|
+
"jsdoc/require-param-name": [
|
|
660
|
+
1,
|
|
661
|
+
{
|
|
662
|
+
"contexts": [
|
|
663
|
+
"FunctionDeclaration",
|
|
664
|
+
"VariableDeclarator > FunctionExpression",
|
|
665
|
+
"MethodDefinition > FunctionExpression",
|
|
666
|
+
"VariableDeclarator > ArrowFunctionExpression"
|
|
667
|
+
]
|
|
668
|
+
}
|
|
669
|
+
],
|
|
670
|
+
"jsdoc/require-param-type": 1,
|
|
671
|
+
"jsdoc/require-param": [
|
|
672
|
+
1,
|
|
673
|
+
{
|
|
674
|
+
"exceptions": [
|
|
675
|
+
"_",
|
|
676
|
+
"config",
|
|
677
|
+
"halfParsed"
|
|
678
|
+
],
|
|
679
|
+
"contexts": [
|
|
680
|
+
"FunctionDeclaration",
|
|
681
|
+
"VariableDeclarator > FunctionExpression",
|
|
682
|
+
"MethodDefinition > FunctionExpression",
|
|
683
|
+
"VariableDeclarator > ArrowFunctionExpression"
|
|
684
|
+
]
|
|
685
|
+
}
|
|
686
|
+
],
|
|
687
|
+
"jsdoc/require-returns-check": [
|
|
688
|
+
1,
|
|
689
|
+
{
|
|
690
|
+
"exemptAsync": false
|
|
691
|
+
}
|
|
692
|
+
],
|
|
693
|
+
"jsdoc/require-returns-type": 1,
|
|
694
|
+
"jsdoc/require-throws": 1
|
|
695
|
+
},
|
|
696
|
+
"overrides": [
|
|
697
|
+
{
|
|
698
|
+
"files": "./index.js",
|
|
699
|
+
"rules": {
|
|
700
|
+
"jsdoc/require-jsdoc": 0
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
],
|
|
704
|
+
"settings": {
|
|
705
|
+
"jsdoc": {
|
|
706
|
+
"tagNamePreference": {
|
|
707
|
+
"augments": "extends"
|
|
708
|
+
},
|
|
709
|
+
"overrideReplacesDocs": [
|
|
710
|
+
"require-description"
|
|
711
|
+
]
|
|
712
|
+
}
|
|
318
713
|
}
|
|
319
714
|
}
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ var Parser = require('wikiparser-node');
|
|
|
29
29
|
14. [DoubleUnderscoreToken](https://github.com/bhsd-harry/wikiparser-node/wiki/12.-DoubleUnderscoreToken)
|
|
30
30
|
15. [LinkToken](https://github.com/bhsd-harry/wikiparser-node/wiki/13.-LinkToken)
|
|
31
31
|
16. [CategoryToken](https://github.com/bhsd-harry/wikiparser-node/wiki/14.-CategoryToken)
|
|
32
|
-
17. [FileToken](https://github.com/bhsd-harry/wikiparser-node/wiki/15.-FileToken)
|
|
32
|
+
17. [FileToken](https://github.com/bhsd-harry/wikiparser-node/wiki/15.-FileToken和GalleryImageToken#filetoken)
|
|
33
33
|
18. [ImageParameterToken](https://github.com/bhsd-harry/wikiparser-node/wiki/16.-ImageParameterToken)
|
|
34
34
|
19. [ExtLinkToken](https://github.com/bhsd-harry/wikiparser-node/wiki/17.-ExtLinkToken和MagicLinkToken#extlinktoken)
|
|
35
35
|
20. [MagicLinkToken](https://github.com/bhsd-harry/wikiparser-node/wiki/17.-ExtLinkToken和MagicLinkToken#magiclinktoken)
|