wikilint 2.44.0 → 2.46.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/config/default.json +1 -2
- package/config/enwiki.json +1 -1
- package/config/jawiki.json +1 -1
- package/config/minimum.json +1 -1
- package/config/zhwiki.json +1 -1
- package/data/ext/templatedata.json +13 -5
- package/data/signatures.json +38 -32
- package/dist/base.d.mts +10 -2
- package/dist/base.d.ts +10 -2
- package/dist/bin/config.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +6 -1
- package/dist/lib/element.js +5 -5
- package/dist/lib/lintConfig.js +7 -0
- package/dist/lib/lsp.d.ts +11 -3
- package/dist/lib/lsp.js +91 -59
- package/dist/lib/node.js +2 -2
- package/dist/lib/text.js +2 -2
- package/dist/map.d.ts +4 -1
- package/dist/mixin/elementLike.js +29 -31
- package/dist/mixin/hidden.js +0 -1
- package/dist/mixin/paramLineParent.d.ts +29 -0
- package/dist/mixin/paramLineParent.js +51 -0
- package/dist/src/arg.js +17 -35
- package/dist/src/atom.d.ts +1 -1
- package/dist/src/atom.js +2 -0
- package/dist/src/attribute.js +10 -5
- package/dist/src/attributes.js +18 -15
- package/dist/src/commented.d.ts +1 -0
- package/dist/src/commented.js +1 -3
- package/dist/src/converterFlags.js +18 -21
- package/dist/src/converterRule.js +2 -2
- package/dist/src/funcTag.d.ts +23 -0
- package/dist/src/funcTag.js +85 -0
- package/dist/src/heading.js +8 -3
- package/dist/src/hidden.d.ts +3 -2
- package/dist/src/hidden.js +29 -5
- package/dist/src/imageParameter.js +16 -4
- package/dist/src/index.js +2 -2
- package/dist/src/link/base.js +14 -2
- package/dist/src/link/categorytree.d.ts +2 -0
- package/dist/src/link/categorytree.js +8 -5
- package/dist/src/link/file.js +21 -14
- package/dist/src/multiLine/charinsert.d.ts +16 -0
- package/dist/src/multiLine/charinsert.js +84 -0
- package/dist/src/multiLine/gallery.js +4 -4
- package/dist/src/multiLine/imagemap.d.ts +1 -1
- package/dist/src/multiLine/imagemap.js +13 -12
- package/dist/src/multiLine/index.d.ts +3 -0
- package/dist/src/multiLine/index.js +79 -18
- package/dist/src/multiLine/inputbox.d.ts +1 -0
- package/dist/src/multiLine/paramTag.d.ts +3 -0
- package/dist/src/multiLine/paramTag.js +60 -13
- package/dist/src/nested.js +23 -25
- package/dist/src/nowiki/quote.js +6 -5
- package/dist/src/paramLine.d.ts +23 -3
- package/dist/src/paramLine.js +129 -31
- package/dist/src/parameter.d.ts +6 -0
- package/dist/src/parameter.js +15 -1
- package/dist/src/singleLine/charinsertLine.d.ts +21 -0
- package/dist/src/singleLine/charinsertLine.js +69 -0
- package/dist/src/{imagemapLink.d.ts → singleLine/imagemapLink.d.ts} +8 -7
- package/dist/src/singleLine/imagemapLink.js +95 -0
- package/dist/src/singleLine/index.d.ts +10 -0
- package/dist/src/singleLine/index.js +16 -0
- package/dist/src/table/td.js +5 -4
- package/dist/src/tag/html.js +26 -8
- package/dist/src/tag/index.js +30 -17
- package/dist/src/tagPair/ext.js +23 -2
- package/dist/src/tagPair/index.js +1 -10
- package/dist/src/transclude.js +15 -15
- package/dist/util/sharable.js +22 -0
- package/dist/util/sharable.mjs +22 -0
- package/dist/util/string.js +27 -2
- package/i18n/en.json +4 -0
- package/i18n/zh-hans.json +4 -0
- package/i18n/zh-hant.json +4 -0
- package/package.json +17 -25
- package/dist/src/imagemapLink.js +0 -34
- /package/dist/{util → vendor}/search.js +0 -0
package/config/default.json
CHANGED
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"templatedata",
|
|
42
42
|
"timeline",
|
|
43
43
|
"page-collection",
|
|
44
|
-
"wish",
|
|
45
44
|
"img"
|
|
46
45
|
],
|
|
47
46
|
"html": [
|
|
@@ -1496,7 +1495,7 @@
|
|
|
1496
1495
|
"EXPECTUNUSEDTEMPLATE": "EXPECTUNUSEDTEMPLATE"
|
|
1497
1496
|
}
|
|
1498
1497
|
],
|
|
1499
|
-
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp
|
|
1498
|
+
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",
|
|
1500
1499
|
"interwiki": [],
|
|
1501
1500
|
"img": {
|
|
1502
1501
|
"thumbnail": "thumbnail",
|
package/config/enwiki.json
CHANGED
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"EXPECTED_UNCONNECTED_PAGE": "EXPECTEDUNCONNECTEDPAGE"
|
|
592
592
|
}
|
|
593
593
|
],
|
|
594
|
-
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp
|
|
594
|
+
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",
|
|
595
595
|
"interwiki": [],
|
|
596
596
|
"img": {
|
|
597
597
|
"alt=$1": "alt",
|
package/config/jawiki.json
CHANGED
|
@@ -899,7 +899,7 @@
|
|
|
899
899
|
"EXPECTED_UNCONNECTED_PAGE": "EXPECTEDUNCONNECTEDPAGE"
|
|
900
900
|
}
|
|
901
901
|
],
|
|
902
|
-
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp
|
|
902
|
+
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",
|
|
903
903
|
"interwiki": [],
|
|
904
904
|
"img": {
|
|
905
905
|
"代替文=$1": "alt",
|
package/config/minimum.json
CHANGED
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
{},
|
|
126
126
|
{}
|
|
127
127
|
],
|
|
128
|
-
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp
|
|
128
|
+
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",
|
|
129
129
|
"interwiki": [],
|
|
130
130
|
"img": {},
|
|
131
131
|
"redirection": [
|
package/config/zhwiki.json
CHANGED
|
@@ -961,7 +961,7 @@
|
|
|
961
961
|
"EXPECTED_UNCONNECTED_PAGE": "EXPECTEDUNCONNECTEDPAGE"
|
|
962
962
|
}
|
|
963
963
|
],
|
|
964
|
-
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp
|
|
964
|
+
"protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",
|
|
965
965
|
"interwiki": [],
|
|
966
966
|
"img": {
|
|
967
967
|
"alt=$1": "alt",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"type": "string"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
]
|
|
16
|
+
],
|
|
17
|
+
"errorMessage": "must be string or object"
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
"type": "object",
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
{
|
|
28
29
|
"type": "null"
|
|
29
30
|
}
|
|
30
|
-
]
|
|
31
|
+
],
|
|
32
|
+
"errorMessage": "must be string or object"
|
|
31
33
|
},
|
|
32
34
|
"params": {
|
|
33
35
|
"markdownDescription": "An object that maps each parameter name of the template to a corresponding [Param object](https://www.mediawiki.org/wiki/Extension:TemplateData#Param_object) describing the properties of that parameter.",
|
|
@@ -60,7 +62,8 @@
|
|
|
60
62
|
{
|
|
61
63
|
"type": "boolean"
|
|
62
64
|
}
|
|
63
|
-
]
|
|
65
|
+
],
|
|
66
|
+
"errorMessage": "must be string or boolean"
|
|
64
67
|
},
|
|
65
68
|
"aliases": {
|
|
66
69
|
"markdownDescription": "List of aliases. An alias is an alternative name for the parameter that may be used instead of (not in addition to) the primary name. Aliases are not documented in a separate Parameter object. If they need more information, they should be in their own property marked \"deprecated\".",
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
"markdownDescription": "The name key of another parameter (must be a valid key in the `params` object). The current [Parameter Object](https://www.mediawiki.org/wiki/Extension:TemplateData#Param_object) will inherit properties from the specified [Parameter Object](https://www.mediawiki.org/wiki/Extension:TemplateData#Param_object), with local properties overriding the inherited ones.",
|
|
105
108
|
"type": "string"
|
|
106
109
|
},
|
|
107
|
-
"
|
|
110
|
+
"suggestedvalues": {
|
|
108
111
|
"markdownDescription": "An optional parameter property. Creates a list of parameter values to help users select the desired value. For the suggested values to be displayed as a combo box in VisualEditor, the parameter’s type must be set to one of the following: content, line, string, number, unknown or unbalanced wikitext.",
|
|
109
112
|
"type": "array",
|
|
110
113
|
"items": {
|
|
@@ -140,6 +143,10 @@
|
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
},
|
|
146
|
+
"required": [
|
|
147
|
+
"label",
|
|
148
|
+
"params"
|
|
149
|
+
],
|
|
143
150
|
"additionalProperties": false
|
|
144
151
|
}
|
|
145
152
|
},
|
|
@@ -172,7 +179,8 @@
|
|
|
172
179
|
}
|
|
173
180
|
}
|
|
174
181
|
}
|
|
175
|
-
]
|
|
182
|
+
],
|
|
183
|
+
"errorMessage": "must be string or array"
|
|
176
184
|
}
|
|
177
185
|
}
|
|
178
186
|
}
|
package/data/signatures.json
CHANGED
|
@@ -115,6 +115,12 @@
|
|
|
115
115
|
"notalk"
|
|
116
116
|
],
|
|
117
117
|
"description": "Makes a page in a talk namespace not be treated like a talk page."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"aliases": [
|
|
121
|
+
"nomediaviewercarousel"
|
|
122
|
+
],
|
|
123
|
+
"description": "Disables the [image carousel](https://www.mediawiki.org/wiki/Readers/Reader_Growth/Image_Browsing) on an article page."
|
|
118
124
|
}
|
|
119
125
|
],
|
|
120
126
|
"parserFunctions": [
|
|
@@ -179,7 +185,7 @@
|
|
|
179
185
|
}
|
|
180
186
|
]
|
|
181
187
|
],
|
|
182
|
-
"description": "A protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/
|
|
188
|
+
"description": "A protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/Manual:Interwiki) prefixes. **Note:** Unbracketed (plain) protocol-relative links are not automagically linked."
|
|
183
189
|
},
|
|
184
190
|
{
|
|
185
191
|
"aliases": [
|
|
@@ -200,7 +206,7 @@
|
|
|
200
206
|
}
|
|
201
207
|
]
|
|
202
208
|
],
|
|
203
|
-
"description": "A percent-encoded protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/
|
|
209
|
+
"description": "A percent-encoded protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/Manual:Interwiki) prefixes. **Note:** Unbracketed (plain) protocol-relative links are not automagically linked."
|
|
204
210
|
},
|
|
205
211
|
{
|
|
206
212
|
"aliases": [
|
|
@@ -221,7 +227,7 @@
|
|
|
221
227
|
}
|
|
222
228
|
]
|
|
223
229
|
],
|
|
224
|
-
"description": "The absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/
|
|
230
|
+
"description": "The absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/Manual:Interwiki) prefixes."
|
|
225
231
|
},
|
|
226
232
|
{
|
|
227
233
|
"aliases": [
|
|
@@ -242,7 +248,7 @@
|
|
|
242
248
|
}
|
|
243
249
|
]
|
|
244
250
|
],
|
|
245
|
-
"description": "The percent-encoded absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/
|
|
251
|
+
"description": "The percent-encoded absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/Manual:Interwiki) prefixes."
|
|
246
252
|
},
|
|
247
253
|
{
|
|
248
254
|
"aliases": [
|
|
@@ -343,7 +349,7 @@
|
|
|
343
349
|
}
|
|
344
350
|
]
|
|
345
351
|
],
|
|
346
|
-
"description": "The current localized name for the [namespace](https://www.mediawiki.org/wiki/
|
|
352
|
+
"description": "The current localized name for the [namespace](https://www.mediawiki.org/wiki/Help:Namespace).\n\nThe main namespace has no name, i.e. `{{ns:0}}` returns an empty string."
|
|
347
353
|
},
|
|
348
354
|
{
|
|
349
355
|
"aliases": [
|
|
@@ -361,7 +367,7 @@
|
|
|
361
367
|
}
|
|
362
368
|
]
|
|
363
369
|
],
|
|
364
|
-
"description": "It returns the current localized name for the [namespace](https://www.mediawiki.org/wiki/
|
|
370
|
+
"description": "It returns the current localized name for the [namespace](https://www.mediawiki.org/wiki/Help:Namespace), but it replaces spaces with underscores, making it usable in external links."
|
|
365
371
|
},
|
|
366
372
|
{
|
|
367
373
|
"aliases": [
|
|
@@ -564,7 +570,7 @@
|
|
|
564
570
|
}
|
|
565
571
|
]
|
|
566
572
|
],
|
|
567
|
-
"description": "The full name of the language for the given [language code](https://www.mediawiki.org/wiki/
|
|
573
|
+
"description": "The full name of the language for the given [language code](https://www.mediawiki.org/wiki/Manual:Language#Language_code): native name (language autonym) by default, name translated in target language if a target language code is specified. [Extension:CLDR](https://www.mediawiki.org/wiki/Extension:CLDR) must be installed for the translation to work. If no argument is given, returns the name of the *target language* (for articles, the content language; for messages, the user language)."
|
|
568
574
|
},
|
|
569
575
|
{
|
|
570
576
|
"aliases": [
|
|
@@ -578,7 +584,7 @@
|
|
|
578
584
|
}
|
|
579
585
|
]
|
|
580
586
|
],
|
|
581
|
-
"description": "The [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language tag for the given [language code](https://www.mediawiki.org/wiki/
|
|
587
|
+
"description": "The [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language tag for the given [language code](https://www.mediawiki.org/wiki/Manual:Language#Language_code). If no argument is given, returns the tag of the *target language* (for articles, the content language; for messages, the user language)."
|
|
582
588
|
},
|
|
583
589
|
{
|
|
584
590
|
"aliases": [
|
|
@@ -601,7 +607,7 @@
|
|
|
601
607
|
}
|
|
602
608
|
]
|
|
603
609
|
],
|
|
604
|
-
"description": "The directionality for the given [language code](https://www.mediawiki.org/wiki/
|
|
610
|
+
"description": "The directionality for the given [language code](https://www.mediawiki.org/wiki/Manual:Language#Language_code), either `rtl` or `ltr`. If the optional second argument is `bcp47`, then the first argument is interpreted as a [BCP-47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag). If no argument is given, returns the directionality of the *target language* (for articles, the content language; for messages, the user language)."
|
|
605
611
|
},
|
|
606
612
|
{
|
|
607
613
|
"aliases": [
|
|
@@ -747,7 +753,7 @@
|
|
|
747
753
|
}
|
|
748
754
|
]
|
|
749
755
|
],
|
|
750
|
-
"description": "The unexpanded wikitext is rendered (more or less, for details see [help](https://www.mediawiki.org/wiki/
|
|
756
|
+
"description": "The unexpanded wikitext is rendered (more or less, for details see [help](https://www.mediawiki.org/wiki/Help:Templates#Usage))."
|
|
751
757
|
},
|
|
752
758
|
{
|
|
753
759
|
"aliases": [
|
|
@@ -841,7 +847,7 @@
|
|
|
841
847
|
}
|
|
842
848
|
]
|
|
843
849
|
],
|
|
844
|
-
"description": "Alias for XML-style MediaWiki parser tags or extension tags. It allows a [pre-save transform of wiki code](https://www.mediawiki.org/wiki/
|
|
850
|
+
"description": "Alias for XML-style MediaWiki parser tags or extension tags. It allows a [pre-save transform of wiki code](https://www.mediawiki.org/wiki/Manual:Tag_extensions#How_do_I_render_wikitext_in_my_extension?) and parser functions within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in `#if` statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters."
|
|
845
851
|
},
|
|
846
852
|
{
|
|
847
853
|
"aliases": [
|
|
@@ -952,7 +958,7 @@
|
|
|
952
958
|
}
|
|
953
959
|
]
|
|
954
960
|
],
|
|
955
|
-
"description": "**[Expensive]** This function takes an input string, interprets it as a page title, and returns one of two values depending on whether or not the page exists on the local wiki.\n\nThe function evaluates to `true` for [system messages](https://www.mediawiki.org/wiki/
|
|
961
|
+
"description": "**[Expensive]** This function takes an input string, interprets it as a page title, and returns one of two values depending on whether or not the page exists on the local wiki.\n\nThe function evaluates to `true` for [system messages](https://www.mediawiki.org/wiki/Help:System_message) that have been customized, and for [special pages](https://www.mediawiki.org/wiki/Help:Special_pages) that are defined by the software.\n\nIf a page checks a target using `#ifexist:`, then that page will appear in the Special:WhatLinksHere list for the target page.\n\n`#ifexist:` does not work with interwiki links.\n\nA page that does not exist and is tested for using #ifexist will end up on the [Wanted Pages](https://www.mediawiki.org/wiki/Manual:WantedPages)."
|
|
956
962
|
},
|
|
957
963
|
{
|
|
958
964
|
"aliases": [
|
|
@@ -1370,7 +1376,7 @@
|
|
|
1370
1376
|
}
|
|
1371
1377
|
]
|
|
1372
1378
|
],
|
|
1373
|
-
"description": "`{{#loop}}` repeatedly parses and displays `block statement` a number of times equal to the absolute value of `number of loops to be performed`. `Starting value` is placed in a variable (accessible by [Variables](https://www.mediawiki.org/wiki/
|
|
1379
|
+
"description": "`{{#loop}}` repeatedly parses and displays `block statement` a number of times equal to the absolute value of `number of loops to be performed`. `Starting value` is placed in a variable (accessible by [Variables](https://www.mediawiki.org/wiki/Extension:Variables) extension's `{{#var:}}` parser function) using the name `variable name`. After each loop, the variable is incremented by one if `number of loops to be performed` is positive, or decremented by one if `number of loops to be performed` is negative."
|
|
1374
1380
|
},
|
|
1375
1381
|
{
|
|
1376
1382
|
"aliases": [
|
|
@@ -1392,7 +1398,7 @@
|
|
|
1392
1398
|
}
|
|
1393
1399
|
]
|
|
1394
1400
|
],
|
|
1395
|
-
"description": "`{{#forargs}}` is to be used in templates.\n\nIt takes arguments that are passed to the template and puts them in variables accessible by [Variables](https://www.mediawiki.org/wiki/
|
|
1401
|
+
"description": "`{{#forargs}}` is to be used in templates.\n\nIt takes arguments that are passed to the template and puts them in variables accessible by [Variables](https://www.mediawiki.org/wiki/Extension:Variables) extension's `{{#var:}}` parser function.\n\nThis function iterates through each argument whose name begins with `prefix`.\n\nWith each iteration it puts the argument name minus `prefix` into `key` as if calling `{{#vardefine: <key> }}`.\n\nIt then takes the value of the argument and puts it into `value` in a similar method.\n\nThe block statement is then expanded.\n\nThe block statement may contain `{{#var: <key> }}` and `{{#var: <value> }}` to access the stored arguments."
|
|
1396
1402
|
},
|
|
1397
1403
|
{
|
|
1398
1404
|
"aliases": [
|
|
@@ -1618,7 +1624,7 @@
|
|
|
1618
1624
|
}
|
|
1619
1625
|
]
|
|
1620
1626
|
],
|
|
1621
|
-
"description": "In the wikitext, the tag is substituted by the content (single-level evaluation only), see [Help:Templates](https://www.mediawiki.org/wiki/
|
|
1627
|
+
"description": "In the wikitext, the tag is substituted by the content (single-level evaluation only), see [Help:Templates](https://www.mediawiki.org/wiki/Help:Templates#Usage)."
|
|
1622
1628
|
},
|
|
1623
1629
|
{
|
|
1624
1630
|
"aliases": [
|
|
@@ -1633,7 +1639,7 @@
|
|
|
1633
1639
|
}
|
|
1634
1640
|
]
|
|
1635
1641
|
],
|
|
1636
|
-
"description": "See [Help:Templates](https://www.mediawiki.org/wiki/
|
|
1642
|
+
"description": "See [Help:Templates](https://www.mediawiki.org/wiki/Help:Templates#Usage)."
|
|
1637
1643
|
},
|
|
1638
1644
|
{
|
|
1639
1645
|
"aliases": [
|
|
@@ -1828,7 +1834,7 @@
|
|
|
1828
1834
|
"dirmark",
|
|
1829
1835
|
"directionmark"
|
|
1830
1836
|
],
|
|
1831
|
-
"description": "Outputs a Unicode directional mark that matches the wiki's default language's direction (`&lrm`; on left-to-right wikis, `&rlm`; on right-to-left wikis), useful in text with multi-directional text. Since 1.19, it depends on the [page content language](https://www.mediawiki.org/wiki/
|
|
1837
|
+
"description": "Outputs a Unicode directional mark that matches the wiki's default language's direction (`&lrm`; on left-to-right wikis, `&rlm`; on right-to-left wikis), useful in text with multi-directional text. Since 1.19, it depends on the [page content language](https://www.mediawiki.org/wiki/Manual:Language#page-content-lang)."
|
|
1832
1838
|
},
|
|
1833
1839
|
{
|
|
1834
1840
|
"aliases": [
|
|
@@ -1873,7 +1879,7 @@
|
|
|
1873
1879
|
}
|
|
1874
1880
|
]
|
|
1875
1881
|
],
|
|
1876
|
-
"description": "Returns the [page identifier (page ID)](https://www.mediawiki.org/wiki/
|
|
1882
|
+
"description": "Returns the [page identifier (page ID)](https://www.mediawiki.org/wiki/Help:Page_ID).\n\n**[Expensive]** Returns the page identifier of the specified page."
|
|
1877
1883
|
},
|
|
1878
1884
|
{
|
|
1879
1885
|
"aliases": [
|
|
@@ -1976,7 +1982,7 @@
|
|
|
1976
1982
|
}
|
|
1977
1983
|
]
|
|
1978
1984
|
],
|
|
1979
|
-
"description": "Unique revision ID.\n\nIt is always empty in preview, thus one can show an error message only in preview. May be disabled in [miser mode (all WMF wikis)](https://www.mediawiki.org/wiki/
|
|
1985
|
+
"description": "**[Expensive unless in miser mode]** Unique revision ID.\n\nIt is always empty in preview, thus one can show an error message only in preview. May be disabled in [miser mode (all WMF wikis)](https://www.mediawiki.org/wiki/Manual:$wgMiserMode) returning `-` instead when not in preview.\n\n**Warning**: This variable **cannot** be [substituted](https://www.mediawiki.org/wiki/Help:Substitution).\n\n**[Expensive]** Unique revision ID of the last revision on the specified page."
|
|
1980
1986
|
},
|
|
1981
1987
|
{
|
|
1982
1988
|
"aliases": [
|
|
@@ -2111,7 +2117,7 @@
|
|
|
2111
2117
|
}
|
|
2112
2118
|
]
|
|
2113
2119
|
],
|
|
2114
|
-
"description": "Format the [display title](https://www.mediawiki.org/wiki/
|
|
2120
|
+
"description": "Format the [display title](https://www.mediawiki.org/wiki/Display_title) of the current page, which is what is typically shown in a page's title header. The value must be equivalent to the default title: only capitalization changes to certain parts of the title (not all) and replacing spaces with underscores are allowed.\n\nIt can take a second argument of *noerror* or *noreplace* to suppress error messages when multiple displaytitles are used on one page or to make this `displaytitle` do nothing if a `displaytitle` was already specified earlier in the page."
|
|
2115
2121
|
},
|
|
2116
2122
|
{
|
|
2117
2123
|
"aliases": [
|
|
@@ -2144,7 +2150,7 @@
|
|
|
2144
2150
|
}
|
|
2145
2151
|
]
|
|
2146
2152
|
],
|
|
2147
|
-
"description": "Used for categorizing pages, sets a default [category sort key](https://www.mediawiki.org/wiki/
|
|
2153
|
+
"description": "Used for categorizing pages, sets a default [category sort key](https://www.mediawiki.org/wiki/Help:Categories). It can take a second argument of *noerror* or *noreplace* to suppress error messages when multiple defaultsortkeys are used on one page or to make this `defaultsort` do nothing if a `defaultsort` was already specified earlier in the page."
|
|
2148
2154
|
},
|
|
2149
2155
|
{
|
|
2150
2156
|
"aliases": [
|
|
@@ -2174,7 +2180,7 @@
|
|
|
2174
2180
|
}
|
|
2175
2181
|
]
|
|
2176
2182
|
],
|
|
2177
|
-
"description": "Number of pages in [content namespaces](https://www.mediawiki.org/wiki/
|
|
2183
|
+
"description": "Number of pages in [content namespaces](https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#content-ns) that qualify as articles."
|
|
2178
2184
|
},
|
|
2179
2185
|
{
|
|
2180
2186
|
"aliases": [
|
|
@@ -2234,7 +2240,7 @@
|
|
|
2234
2240
|
}
|
|
2235
2241
|
]
|
|
2236
2242
|
],
|
|
2237
|
-
"description": "Number of users in the *sysop* [group](https://www.mediawiki.org/wiki/
|
|
2243
|
+
"description": "Number of users in the *sysop* [group](https://www.mediawiki.org/wiki/Manual:User_rights)."
|
|
2238
2244
|
},
|
|
2239
2245
|
{
|
|
2240
2246
|
"aliases": [
|
|
@@ -2299,7 +2305,7 @@
|
|
|
2299
2305
|
}
|
|
2300
2306
|
]
|
|
2301
2307
|
],
|
|
2302
|
-
"description": "**[Expensive]** Number of pages (including subcategories and files if no second argument is provided) in the given [category](https://www.mediawiki.org/wiki/
|
|
2308
|
+
"description": "**[Expensive]** Number of pages (including subcategories and files if no second argument is provided) in the given [category](https://www.mediawiki.org/wiki/Help:Categories)."
|
|
2303
2309
|
},
|
|
2304
2310
|
{
|
|
2305
2311
|
"aliases": [
|
|
@@ -2322,7 +2328,7 @@
|
|
|
2322
2328
|
}
|
|
2323
2329
|
]
|
|
2324
2330
|
],
|
|
2325
|
-
"description": "Number of users in a specific [group](https://www.mediawiki.org/wiki/
|
|
2331
|
+
"description": "Number of users in a specific [group](https://www.mediawiki.org/wiki/Manual:User_rights)."
|
|
2326
2332
|
},
|
|
2327
2333
|
{
|
|
2328
2334
|
"aliases": [
|
|
@@ -2392,7 +2398,7 @@
|
|
|
2392
2398
|
}
|
|
2393
2399
|
]
|
|
2394
2400
|
],
|
|
2395
|
-
"description": "Page name of the page in the immediately superior [subpage](https://www.mediawiki.org/wiki/
|
|
2401
|
+
"description": "Page name of the page in the immediately superior [subpage](https://www.mediawiki.org/wiki/Help:Subpages) level without the namespace."
|
|
2396
2402
|
},
|
|
2397
2403
|
{
|
|
2398
2404
|
"aliases": [
|
|
@@ -2406,7 +2412,7 @@
|
|
|
2406
2412
|
}
|
|
2407
2413
|
]
|
|
2408
2414
|
],
|
|
2409
|
-
"description": "URL encoded page name of the page in the immediately superior [subpage](https://www.mediawiki.org/wiki/
|
|
2415
|
+
"description": "URL encoded page name of the page in the immediately superior [subpage](https://www.mediawiki.org/wiki/Help:Subpages) level without the namespace."
|
|
2410
2416
|
},
|
|
2411
2417
|
{
|
|
2412
2418
|
"aliases": [
|
|
@@ -2448,7 +2454,7 @@
|
|
|
2448
2454
|
}
|
|
2449
2455
|
]
|
|
2450
2456
|
],
|
|
2451
|
-
"description": "The [subpage](https://www.mediawiki.org/wiki/
|
|
2457
|
+
"description": "The [subpage](https://www.mediawiki.org/wiki/Help:Subpages) title. If no subpage exists, the value of `{{PAGENAME}}` is returned."
|
|
2452
2458
|
},
|
|
2453
2459
|
{
|
|
2454
2460
|
"aliases": [
|
|
@@ -2462,7 +2468,7 @@
|
|
|
2462
2468
|
}
|
|
2463
2469
|
]
|
|
2464
2470
|
],
|
|
2465
|
-
"description": "The URL encoded [subpage](https://www.mediawiki.org/wiki/
|
|
2471
|
+
"description": "The URL encoded [subpage](https://www.mediawiki.org/wiki/Help:Subpages) title. If no subpage exists, the value of `{{PAGENAME}}` is returned."
|
|
2466
2472
|
},
|
|
2467
2473
|
{
|
|
2468
2474
|
"aliases": [
|
|
@@ -2562,7 +2568,7 @@
|
|
|
2562
2568
|
}
|
|
2563
2569
|
]
|
|
2564
2570
|
],
|
|
2565
|
-
"description": "[ID](https://www.mediawiki.org/wiki/
|
|
2571
|
+
"description": "[ID](https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces) of the page's namespace"
|
|
2566
2572
|
},
|
|
2567
2573
|
{
|
|
2568
2574
|
"aliases": [
|
|
@@ -2626,13 +2632,13 @@
|
|
|
2626
2632
|
"aliases": [
|
|
2627
2633
|
"!"
|
|
2628
2634
|
],
|
|
2629
|
-
"description": "Used to include a vertical bar (pipe).\n\nSee [help](https://www.mediawiki.org/wiki/
|
|
2635
|
+
"description": "Used to include a vertical bar (pipe).\n\nSee [help](https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#Escaping_pipe_characters_in_tables) for further explanation."
|
|
2630
2636
|
},
|
|
2631
2637
|
{
|
|
2632
2638
|
"aliases": [
|
|
2633
2639
|
"="
|
|
2634
2640
|
],
|
|
2635
|
-
"description": "Used to include an equal sign.\n\nSee [help](https://www.mediawiki.org/wiki/
|
|
2641
|
+
"description": "Used to include an equal sign.\n\nSee [help](https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#Raw_equal_signs) for further explanation."
|
|
2636
2642
|
},
|
|
2637
2643
|
{
|
|
2638
2644
|
"aliases": [
|
package/dist/base.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Range, Position, ColorInformation, ColorPresentation, CompletionItem as CompletionItemBase, CompletionItemKind, FoldingRange, DocumentLink, Location, WorkspaceEdit, Diagnostic, Hover, SignatureHelp, InlayHint, CodeAction, DocumentSymbol } from 'vscode-languageserver-types';
|
|
1
|
+
import type { Range, Position, ColorInformation, ColorPresentation, CompletionItem as CompletionItemBase, CompletionItemKind, FoldingRange, DocumentLink, DocumentHighlight, Location, WorkspaceEdit, Diagnostic, Hover, SignatureHelp, InlayHint, CodeAction, DocumentSymbol } from 'vscode-languageserver-types';
|
|
2
2
|
export interface Config {
|
|
3
3
|
ext: string[];
|
|
4
4
|
readonly html: [string[], string[], string[]];
|
|
@@ -15,7 +15,7 @@ export interface Config {
|
|
|
15
15
|
articlePath?: string;
|
|
16
16
|
}
|
|
17
17
|
export type ConfigData = Omit<Config, 'excludes'>;
|
|
18
|
-
export type TokenTypes = 'root' | 'plain' | 'redirect' | 'redirect-syntax' | 'redirect-target' | 'translate' | 'translate-attr' | 'translate-inner' | 'tvar' | 'tvar-name' | 'onlyinclude' | 'noinclude' | 'include' | 'comment' | 'ext' | 'ext-attrs' | 'ext-attr-dirty' | 'ext-attr' | 'attr-key' | 'attr-value' | 'ext-inner' | 'arg' | 'arg-name' | 'arg-default' | 'hidden' | 'magic-word' | 'magic-word-name' | 'invoke-function' | 'invoke-module' | 'template' | 'template-name' | 'parameter' | 'parameter-key' | 'parameter-value' | 'heading' | 'heading-title' | 'heading-trail' | 'html' | 'html-attrs' | 'html-attr-dirty' | 'html-attr' | 'table' | 'tr' | 'td' | 'table-syntax' | 'table-attrs' | 'table-attr-dirty' | 'table-attr' | 'table-inter' | 'td-inner' | 'hr' | 'double-underscore' | 'link' | 'link-target' | 'link-text' | 'category' | 'file' | 'gallery-image' | 'imagemap-image' | 'image-parameter' | 'quote' | 'ext-link' | 'ext-link-text' | 'ext-link-url' | 'free-ext-link' | 'magic-link' | 'list' | 'dd' | 'converter' | 'converter-flags' | 'converter-flag' | 'converter-rule' | 'converter-rule-variant' | 'converter-rule-to' | 'converter-rule-from' | 'param-line' | 'imagemap-link';
|
|
18
|
+
export type TokenTypes = 'root' | 'plain' | 'redirect' | 'redirect-syntax' | 'redirect-target' | 'translate' | 'translate-attr' | 'translate-inner' | 'tvar' | 'tvar-name' | 'onlyinclude' | 'noinclude' | 'include' | 'comment' | 'ext' | 'ext-attrs' | 'ext-attr-dirty' | 'ext-attr' | 'attr-key' | 'attr-value' | 'ext-inner' | 'arg' | 'arg-name' | 'arg-default' | 'hidden' | 'magic-word' | 'magic-word-name' | 'invoke-function' | 'invoke-module' | 'template' | 'template-name' | 'parameter' | 'parameter-key' | 'parameter-value' | 'heading' | 'heading-title' | 'heading-trail' | 'html' | 'html-attrs' | 'html-attr-dirty' | 'html-attr' | 'table' | 'tr' | 'td' | 'table-syntax' | 'table-attrs' | 'table-attr-dirty' | 'table-attr' | 'table-inter' | 'td-inner' | 'hr' | 'double-underscore' | 'link' | 'link-target' | 'link-text' | 'category' | 'file' | 'gallery-image' | 'imagemap-image' | 'image-parameter' | 'quote' | 'ext-link' | 'ext-link-text' | 'ext-link-url' | 'free-ext-link' | 'magic-link' | 'list' | 'dd' | 'converter' | 'converter-flags' | 'converter-flag' | 'converter-rule' | 'converter-rule-variant' | 'converter-rule-to' | 'converter-rule-from' | 'param-line' | 'param-line-key' | 'param-line-value' | 'imagemap-link' | 'charinsert-line';
|
|
19
19
|
export declare const stages: {
|
|
20
20
|
redirect: number;
|
|
21
21
|
onlyinclude: number;
|
|
@@ -177,6 +177,14 @@ export interface LanguageService {
|
|
|
177
177
|
* @param text source Wikitext / 源代码
|
|
178
178
|
*/
|
|
179
179
|
provideLinks(text: string): Promise<DocumentLink[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Provide document highlights
|
|
182
|
+
*
|
|
183
|
+
* 提供文档高亮
|
|
184
|
+
* @param text source Wikitext / 源代码
|
|
185
|
+
* @param position position / 位置
|
|
186
|
+
*/
|
|
187
|
+
provideDocumentHighlights(text: string, position: Position): Promise<DocumentHighlight[] | undefined>;
|
|
180
188
|
/**
|
|
181
189
|
* Provide references
|
|
182
190
|
*
|
package/dist/base.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Range, Position, ColorInformation, ColorPresentation, CompletionItem as CompletionItemBase, CompletionItemKind, FoldingRange, DocumentLink, Location, WorkspaceEdit, Diagnostic, Hover, SignatureHelp, InlayHint, CodeAction, DocumentSymbol } from 'vscode-languageserver-types';
|
|
1
|
+
import type { Range, Position, ColorInformation, ColorPresentation, CompletionItem as CompletionItemBase, CompletionItemKind, FoldingRange, DocumentLink, DocumentHighlight, Location, WorkspaceEdit, Diagnostic, Hover, SignatureHelp, InlayHint, CodeAction, DocumentSymbol } from 'vscode-languageserver-types';
|
|
2
2
|
export interface Config {
|
|
3
3
|
ext: string[];
|
|
4
4
|
readonly html: [string[], string[], string[]];
|
|
@@ -15,7 +15,7 @@ export interface Config {
|
|
|
15
15
|
articlePath?: string;
|
|
16
16
|
}
|
|
17
17
|
export type ConfigData = Omit<Config, 'excludes'>;
|
|
18
|
-
export type TokenTypes = 'root' | 'plain' | 'redirect' | 'redirect-syntax' | 'redirect-target' | 'translate' | 'translate-attr' | 'translate-inner' | 'tvar' | 'tvar-name' | 'onlyinclude' | 'noinclude' | 'include' | 'comment' | 'ext' | 'ext-attrs' | 'ext-attr-dirty' | 'ext-attr' | 'attr-key' | 'attr-value' | 'ext-inner' | 'arg' | 'arg-name' | 'arg-default' | 'hidden' | 'magic-word' | 'magic-word-name' | 'invoke-function' | 'invoke-module' | 'template' | 'template-name' | 'parameter' | 'parameter-key' | 'parameter-value' | 'heading' | 'heading-title' | 'heading-trail' | 'html' | 'html-attrs' | 'html-attr-dirty' | 'html-attr' | 'table' | 'tr' | 'td' | 'table-syntax' | 'table-attrs' | 'table-attr-dirty' | 'table-attr' | 'table-inter' | 'td-inner' | 'hr' | 'double-underscore' | 'link' | 'link-target' | 'link-text' | 'category' | 'file' | 'gallery-image' | 'imagemap-image' | 'image-parameter' | 'quote' | 'ext-link' | 'ext-link-text' | 'ext-link-url' | 'free-ext-link' | 'magic-link' | 'list' | 'dd' | 'converter' | 'converter-flags' | 'converter-flag' | 'converter-rule' | 'converter-rule-variant' | 'converter-rule-to' | 'converter-rule-from' | 'param-line' | 'imagemap-link';
|
|
18
|
+
export type TokenTypes = 'root' | 'plain' | 'redirect' | 'redirect-syntax' | 'redirect-target' | 'translate' | 'translate-attr' | 'translate-inner' | 'tvar' | 'tvar-name' | 'onlyinclude' | 'noinclude' | 'include' | 'comment' | 'ext' | 'ext-attrs' | 'ext-attr-dirty' | 'ext-attr' | 'attr-key' | 'attr-value' | 'ext-inner' | 'arg' | 'arg-name' | 'arg-default' | 'hidden' | 'magic-word' | 'magic-word-name' | 'invoke-function' | 'invoke-module' | 'template' | 'template-name' | 'parameter' | 'parameter-key' | 'parameter-value' | 'heading' | 'heading-title' | 'heading-trail' | 'html' | 'html-attrs' | 'html-attr-dirty' | 'html-attr' | 'table' | 'tr' | 'td' | 'table-syntax' | 'table-attrs' | 'table-attr-dirty' | 'table-attr' | 'table-inter' | 'td-inner' | 'hr' | 'double-underscore' | 'link' | 'link-target' | 'link-text' | 'category' | 'file' | 'gallery-image' | 'imagemap-image' | 'image-parameter' | 'quote' | 'ext-link' | 'ext-link-text' | 'ext-link-url' | 'free-ext-link' | 'magic-link' | 'list' | 'dd' | 'converter' | 'converter-flags' | 'converter-flag' | 'converter-rule' | 'converter-rule-variant' | 'converter-rule-to' | 'converter-rule-from' | 'param-line' | 'param-line-key' | 'param-line-value' | 'imagemap-link' | 'charinsert-line';
|
|
19
19
|
export declare const stages: {
|
|
20
20
|
redirect: number;
|
|
21
21
|
onlyinclude: number;
|
|
@@ -177,6 +177,14 @@ export interface LanguageService {
|
|
|
177
177
|
* @param text source Wikitext / 源代码
|
|
178
178
|
*/
|
|
179
179
|
provideLinks(text: string): Promise<DocumentLink[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Provide document highlights
|
|
182
|
+
*
|
|
183
|
+
* 提供文档高亮
|
|
184
|
+
* @param text source Wikitext / 源代码
|
|
185
|
+
* @param position position / 位置
|
|
186
|
+
*/
|
|
187
|
+
provideDocumentHighlights(text: string, position: Position): Promise<DocumentHighlight[] | undefined>;
|
|
180
188
|
/**
|
|
181
189
|
* Provide references
|
|
182
190
|
*
|
package/dist/bin/config.js
CHANGED
|
@@ -41,7 +41,7 @@ const filterGadget = (id) => {
|
|
|
41
41
|
const n = Number(id);
|
|
42
42
|
return n < 2300 || n > 2303; // Gadget, Gadget talk, Gadget definition, Gadget definition talk
|
|
43
43
|
};
|
|
44
|
-
const pkg =
|
|
44
|
+
const pkg = 'wikilint', version = '2.46.0';
|
|
45
45
|
/**
|
|
46
46
|
* Get the parser configuration for a Wikimedia Foundation project.
|
|
47
47
|
* @param site site nickname
|
package/dist/index.js
CHANGED
|
@@ -192,7 +192,7 @@ const Parser = {
|
|
|
192
192
|
maxStage ??= constants_1.MAX_STAGE;
|
|
193
193
|
config ??= this.getConfig();
|
|
194
194
|
let types;
|
|
195
|
-
|
|
195
|
+
LSP: if (typeof maxStage !== 'number') {
|
|
196
196
|
types = Array.isArray(maxStage) ? maxStage : [maxStage];
|
|
197
197
|
maxStage = Math.max(...types.map(t => base_1.stages[t] || constants_1.MAX_STAGE));
|
|
198
198
|
}
|
package/dist/internal.d.ts
CHANGED
|
@@ -38,15 +38,20 @@ export type { ConverterRuleToken } from './src/converterRule';
|
|
|
38
38
|
export type { ConverterToken } from './src/converter';
|
|
39
39
|
export type { NowikiToken } from './src/nowiki/index';
|
|
40
40
|
export type { PreToken } from './src/pre';
|
|
41
|
+
export type { MultiLineToken } from './src/multiLine/index';
|
|
41
42
|
export type { ParamTagToken } from './src/multiLine/paramTag';
|
|
42
43
|
export type { InputboxToken } from './src/multiLine/inputbox';
|
|
43
44
|
export type { NestedToken } from './src/nested';
|
|
44
45
|
export type { GalleryToken } from './src/multiLine/gallery';
|
|
45
|
-
export type {
|
|
46
|
+
export type { SingleLineToken } from './src/singleLine/index';
|
|
47
|
+
export type { ImagemapLinkToken } from './src/singleLine/imagemapLink';
|
|
46
48
|
export type { ImagemapToken } from './src/multiLine/imagemap';
|
|
47
49
|
export type { CommentedToken } from './src/commented';
|
|
48
50
|
export type { CategorytreeToken } from './src/link/categorytree';
|
|
49
51
|
export type { ParamLineToken } from './src/paramLine';
|
|
52
|
+
export type { CharinsertLineToken } from './src/singleLine/charinsertLine';
|
|
53
|
+
export type { CharinsertToken } from './src/multiLine/charinsert';
|
|
50
54
|
export type { CommentLineToken } from './src/nowiki/commentLine';
|
|
51
55
|
export type { TranslateToken } from './src/tagPair/translate';
|
|
52
56
|
export type { TvarToken } from './src/tag/tvar';
|
|
57
|
+
export type { FuncTagToken } from './src/funcTag';
|
package/dist/lib/element.js
CHANGED
|
@@ -89,7 +89,7 @@ let AstElement = (() => {
|
|
|
89
89
|
}
|
|
90
90
|
/** @private */
|
|
91
91
|
isInside(type) {
|
|
92
|
-
return this.closest(`${type},ext`)?.type === type;
|
|
92
|
+
LINT: return this.closest(`${type},ext`)?.type === type;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Insert a batch of child nodes at the end
|
|
@@ -145,7 +145,7 @@ let AstElement = (() => {
|
|
|
145
145
|
return undefined;
|
|
146
146
|
}
|
|
147
147
|
const { length } = this.toString();
|
|
148
|
-
if (index > length
|
|
148
|
+
if (Math.abs(index) > length) {
|
|
149
149
|
return undefined;
|
|
150
150
|
}
|
|
151
151
|
index += index < 0 ? length : 0;
|
|
@@ -201,9 +201,9 @@ let AstElement = (() => {
|
|
|
201
201
|
/** @private */
|
|
202
202
|
lint(start = this.getAbsoluteIndex(), re) {
|
|
203
203
|
LINT: {
|
|
204
|
-
const errors = [];
|
|
205
|
-
for (let i = 0, cur = start + this.getAttribute('padding'); i <
|
|
206
|
-
const child =
|
|
204
|
+
const errors = [], { length, childNodes } = this;
|
|
205
|
+
for (let i = 0, cur = start + this.getAttribute('padding'); i < length; i++) {
|
|
206
|
+
const child = childNodes[i];
|
|
207
207
|
child.setAttribute('aIndex', cur);
|
|
208
208
|
const childErrors = child.lint(cur, re);
|
|
209
209
|
if (childErrors.length > 0) {
|
package/dist/lib/lintConfig.js
CHANGED
|
@@ -61,8 +61,10 @@ const defaultLintRuleConfig = {
|
|
|
61
61
|
'invalid-imagemap': [
|
|
62
62
|
2,
|
|
63
63
|
{
|
|
64
|
+
// coord: 2,
|
|
64
65
|
// image: 2,
|
|
65
66
|
// link: 2,
|
|
67
|
+
// shape: 2,
|
|
66
68
|
},
|
|
67
69
|
],
|
|
68
70
|
'invalid-invoke': [
|
|
@@ -121,6 +123,9 @@ const defaultLintRuleConfig = {
|
|
|
121
123
|
// imageParameter: 2,
|
|
122
124
|
// parameter: 2,
|
|
123
125
|
unknownImageParameter: 1,
|
|
126
|
+
// dynamicpagelist: 2,
|
|
127
|
+
// inputbox: 2,
|
|
128
|
+
// seo: 2,
|
|
124
129
|
},
|
|
125
130
|
],
|
|
126
131
|
'no-ignored': [
|
|
@@ -138,11 +143,13 @@ const defaultLintRuleConfig = {
|
|
|
138
143
|
nonWordAttributes: 1,
|
|
139
144
|
redirect: 1,
|
|
140
145
|
// categorytree: 2,
|
|
146
|
+
// charinsert: 2,
|
|
141
147
|
// choose: 2,
|
|
142
148
|
// combobox: 2,
|
|
143
149
|
// dynamicpagelist: 2,
|
|
144
150
|
// inputbox: 2,
|
|
145
151
|
// references: 2,
|
|
152
|
+
// seo: 2,
|
|
146
153
|
},
|
|
147
154
|
],
|
|
148
155
|
'obsolete-attr': [1],
|