wikilint 2.46.3 → 2.46.4
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/README.md +1 -1
- package/config/default.json +4 -0
- package/config/enwiki.json +4 -0
- package/config/jawiki.json +4 -0
- package/config/zhwiki.json +4 -0
- package/data/signatures.json +11 -5
- package/dist/bin/config.js +1 -1
- package/dist/lib/document.d.ts +8 -2
- package/dist/util/constants.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
package/config/default.json
CHANGED
|
@@ -603,6 +603,7 @@
|
|
|
603
603
|
"chart",
|
|
604
604
|
"avatar",
|
|
605
605
|
"img",
|
|
606
|
+
"uic",
|
|
606
607
|
"mentor"
|
|
607
608
|
],
|
|
608
609
|
"variable": [
|
|
@@ -953,6 +954,8 @@
|
|
|
953
954
|
"#lstx": "lstx",
|
|
954
955
|
"#section-x": "lstx",
|
|
955
956
|
"#assessment": "assessment",
|
|
957
|
+
"#uic": "uic",
|
|
958
|
+
"#userinfocard": "uic",
|
|
956
959
|
"#mentor": "mentor",
|
|
957
960
|
"#property": "property",
|
|
958
961
|
"#屬性": "property",
|
|
@@ -1449,6 +1452,7 @@
|
|
|
1449
1452
|
"nomediaviewercarousel": "nomediaviewercarousel"
|
|
1450
1453
|
},
|
|
1451
1454
|
{
|
|
1455
|
+
"EXPECTSHORTPAGE": "EXPECTSHORTPAGE",
|
|
1452
1456
|
"EXPECTUNUSEDCATEGORY": "EXPECTUNUSEDCATEGORY",
|
|
1453
1457
|
"DISAMBIG": "DISAMBIGUATION",
|
|
1454
1458
|
"消除歧义": "DISAMBIGUATION",
|
package/config/enwiki.json
CHANGED
|
@@ -280,6 +280,7 @@
|
|
|
280
280
|
"commaseparatedlist",
|
|
281
281
|
"assessment",
|
|
282
282
|
"chart",
|
|
283
|
+
"uic",
|
|
283
284
|
"mentor",
|
|
284
285
|
"msgnw"
|
|
285
286
|
],
|
|
@@ -436,6 +437,8 @@
|
|
|
436
437
|
"#commaseparatedlist": "commaseparatedlist",
|
|
437
438
|
"#assessment": "assessment",
|
|
438
439
|
"#chart": "chart",
|
|
440
|
+
"#uic": "uic",
|
|
441
|
+
"#userinfocard": "uic",
|
|
439
442
|
"#mentor": "mentor",
|
|
440
443
|
"articlepath": "articlepath",
|
|
441
444
|
"scriptpath": "scriptpath",
|
|
@@ -578,6 +581,7 @@
|
|
|
578
581
|
"notalk": "notalk"
|
|
579
582
|
},
|
|
580
583
|
{
|
|
584
|
+
"EXPECTSHORTPAGE": "EXPECTSHORTPAGE",
|
|
581
585
|
"EXPECTUNUSEDCATEGORY": "EXPECTUNUSEDCATEGORY",
|
|
582
586
|
"EXPECTUNUSEDTEMPLATE": "EXPECTUNUSEDTEMPLATE",
|
|
583
587
|
"HIDDENCAT": "HIDDENCAT",
|
package/config/jawiki.json
CHANGED
|
@@ -306,6 +306,7 @@
|
|
|
306
306
|
"statements",
|
|
307
307
|
"commaseparatedlist",
|
|
308
308
|
"chart",
|
|
309
|
+
"uic",
|
|
309
310
|
"mentor",
|
|
310
311
|
"msgnw"
|
|
311
312
|
],
|
|
@@ -510,6 +511,8 @@
|
|
|
510
511
|
"#statements": "statements",
|
|
511
512
|
"#commaseparatedlist": "commaseparatedlist",
|
|
512
513
|
"#chart": "chart",
|
|
514
|
+
"#uic": "uic",
|
|
515
|
+
"#userinfocard": "uic",
|
|
513
516
|
"#mentor": "mentor",
|
|
514
517
|
"記事パス": "articlepath",
|
|
515
518
|
"articlepath": "articlepath",
|
|
@@ -863,6 +866,7 @@
|
|
|
863
866
|
"notalk": "notalk"
|
|
864
867
|
},
|
|
865
868
|
{
|
|
869
|
+
"EXPECTSHORTPAGE": "EXPECTSHORTPAGE",
|
|
866
870
|
"EXPECTUNUSEDCATEGORY": "EXPECTUNUSEDCATEGORY",
|
|
867
871
|
"EXPECTUNUSEDTEMPLATE": "EXPECTUNUSEDTEMPLATE",
|
|
868
872
|
"カテゴリ非表示": "HIDDENCAT",
|
package/config/zhwiki.json
CHANGED
|
@@ -419,6 +419,7 @@
|
|
|
419
419
|
"commaseparatedlist",
|
|
420
420
|
"assessment",
|
|
421
421
|
"chart",
|
|
422
|
+
"uic",
|
|
422
423
|
"mentor",
|
|
423
424
|
"msgnw"
|
|
424
425
|
],
|
|
@@ -649,6 +650,8 @@
|
|
|
649
650
|
"#commaseparatedlist": "commaseparatedlist",
|
|
650
651
|
"#assessment": "assessment",
|
|
651
652
|
"#chart": "chart",
|
|
653
|
+
"#uic": "uic",
|
|
654
|
+
"#userinfocard": "uic",
|
|
652
655
|
"#mentor": "mentor",
|
|
653
656
|
"articlepath": "articlepath",
|
|
654
657
|
"条目路径": "articlepath",
|
|
@@ -938,6 +941,7 @@
|
|
|
938
941
|
"notalk": "notalk"
|
|
939
942
|
},
|
|
940
943
|
{
|
|
944
|
+
"EXPECTSHORTPAGE": "EXPECTSHORTPAGE",
|
|
941
945
|
"EXPECTUNUSEDCATEGORY": "EXPECTUNUSEDCATEGORY",
|
|
942
946
|
"EXPECTUNUSEDTEMPLATE": "EXPECTUNUSEDTEMPLATE",
|
|
943
947
|
"HIDDENCAT": "HIDDENCAT",
|
package/data/signatures.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"aliases": [
|
|
53
53
|
"expectunusedcategory"
|
|
54
54
|
],
|
|
55
|
-
"description": "Used on a category page, removes the category from Special:UnusedCategories."
|
|
55
|
+
"description": "Used on a category page, removes the category from [Special:UnusedCategories](https://www.mediawiki.org/wiki/Special:UnusedCategories)."
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"aliases": [
|
|
@@ -90,7 +90,13 @@
|
|
|
90
90
|
"aliases": [
|
|
91
91
|
"expectunusedtemplate"
|
|
92
92
|
],
|
|
93
|
-
"description": "Used on a template page, removes the page from Special:UnusedTemplates."
|
|
93
|
+
"description": "Used on a template page, removes the page from [Special:UnusedTemplates](https://www.mediawiki.org/wiki/Special:UnusedTemplates)."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"aliases": [
|
|
97
|
+
"expectshortpage"
|
|
98
|
+
],
|
|
99
|
+
"description": "Used on a article page, removes the page from [Special:ShortPages](https://www.mediawiki.org/wiki/Special:ShortPages)."
|
|
94
100
|
},
|
|
95
101
|
{
|
|
96
102
|
"aliases": [
|
|
@@ -702,7 +708,7 @@
|
|
|
702
708
|
}
|
|
703
709
|
]
|
|
704
710
|
],
|
|
705
|
-
"description": "A switch for the gender set by the user in Special:Preferences.\n\nIf only two parameters are used (for male and female text) but the 3rd parameter is omitted, and user hasn't defined their gender, then the first parameter (`male text`) is returned as a default.\n\nA blank username field (`{{GENDER:|`) means the current user, but can be used only in interface messages (MediaWiki namespace).\n\nUsing a dot (`.`) in the username field produces the output corresponding to the default user gender on this wiki."
|
|
711
|
+
"description": "A switch for the gender set by the user in [Special:Preferences](https://www.mediawiki.org/wiki/Special:Preferences).\n\nIf only two parameters are used (for male and female text) but the 3rd parameter is omitted, and user hasn't defined their gender, then the first parameter (`male text`) is returned as a default.\n\nA blank username field (`{{GENDER:|`) means the current user, but can be used only in interface messages (MediaWiki namespace).\n\nUsing a dot (`.`) in the username field produces the output corresponding to the default user gender on this wiki."
|
|
706
712
|
},
|
|
707
713
|
{
|
|
708
714
|
"aliases": [
|
|
@@ -958,7 +964,7 @@
|
|
|
958
964
|
}
|
|
959
965
|
]
|
|
960
966
|
],
|
|
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)."
|
|
967
|
+
"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](https://www.mediawiki.org/wiki/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)."
|
|
962
968
|
},
|
|
963
969
|
{
|
|
964
970
|
"aliases": [
|
|
@@ -2255,7 +2261,7 @@
|
|
|
2255
2261
|
}
|
|
2256
2262
|
]
|
|
2257
2263
|
],
|
|
2258
|
-
"description": "Number of active users, based on the criteria used in Special:Statistics."
|
|
2264
|
+
"description": "Number of active users, based on the criteria used in [Special:Statistics](https://www.mediawiki.org/wiki/Special:Statistics)."
|
|
2259
2265
|
},
|
|
2260
2266
|
{
|
|
2261
2267
|
"aliases": [
|
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 = 'wikilint', version = '2.46.
|
|
44
|
+
const pkg = 'wikilint', version = '2.46.4';
|
|
45
45
|
/**
|
|
46
46
|
* Get the parser configuration for a Wikimedia Foundation project.
|
|
47
47
|
* @param site site nickname
|
package/dist/lib/document.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Position } from 'vscode-languageserver-types';
|
|
2
|
-
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
2
|
+
import type { TextDocument, Range } from 'vscode-languageserver-textdocument';
|
|
3
3
|
import type { JSONDocument, LanguageService as JSONLanguageService } from 'vscode-json-languageservice';
|
|
4
4
|
import type { Stylesheet, LanguageService as CSSLanguageService } from 'vscode-css-languageservice';
|
|
5
5
|
import type { IHTMLDataProvider } from 'vscode-html-languageservice';
|
|
@@ -37,13 +37,15 @@ export declare const loadCssLSP: () => CSSLanguageService | null;
|
|
|
37
37
|
export declare const loadHtmlData: () => IHTMLDataProvider | null;
|
|
38
38
|
export declare const loadStylelint: () => PublicApi | null;
|
|
39
39
|
/** embedded document */
|
|
40
|
-
declare class EmbeddedDocument implements TextDocument {
|
|
40
|
+
declare abstract class EmbeddedDocument implements TextDocument {
|
|
41
41
|
#private;
|
|
42
42
|
languageId: string;
|
|
43
43
|
lineCount: number;
|
|
44
44
|
pre: string;
|
|
45
45
|
uri: string;
|
|
46
46
|
version: number;
|
|
47
|
+
abstract getLineRange(): Range;
|
|
48
|
+
abstract getEOLCharacters(): string;
|
|
47
49
|
/**
|
|
48
50
|
* @param id language ID
|
|
49
51
|
* @param root root token
|
|
@@ -64,6 +66,8 @@ declare class EmbeddedDocument implements TextDocument {
|
|
|
64
66
|
/** embedded JSON document */
|
|
65
67
|
export declare class EmbeddedJSONDocument extends EmbeddedDocument {
|
|
66
68
|
jsonDoc: JSONDocument;
|
|
69
|
+
abstract getLineRange(): Range;
|
|
70
|
+
abstract getEOLCharacters(): string;
|
|
67
71
|
/**
|
|
68
72
|
* @param root root token
|
|
69
73
|
* @param token current token
|
|
@@ -73,6 +77,8 @@ export declare class EmbeddedJSONDocument extends EmbeddedDocument {
|
|
|
73
77
|
/** embedded CSS document */
|
|
74
78
|
export declare class EmbeddedCSSDocument extends EmbeddedDocument {
|
|
75
79
|
styleSheet: Stylesheet;
|
|
80
|
+
abstract getLineRange(): Range;
|
|
81
|
+
abstract getEOLCharacters(): string;
|
|
76
82
|
/**
|
|
77
83
|
* @param root root token
|
|
78
84
|
* @param token current token
|
package/dist/util/constants.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.enMsg = (() => {
|
|
|
12
12
|
// eslint-disable-next-line n/no-missing-require
|
|
13
13
|
'../../i18n/en.json');
|
|
14
14
|
})();
|
|
15
|
-
exports.galleryParams = new Set(['alt', 'link', 'lang', 'page', 'caption']);
|
|
15
|
+
exports.galleryParams = new Set(['alt', 'link', 'lang', 'page', 'caption', 'class']);
|
|
16
16
|
exports.extensions = new Set(['tiff', 'tif', 'png', 'gif', 'jpg', 'jpeg', 'webp', 'xcf', 'pdf', 'svg', 'djvu']);
|
|
17
17
|
exports.jsonTags = ['templatedata', 'mapframe', 'maplink'];
|
|
18
18
|
/* NOT FOR BROWSER ONLY */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikilint",
|
|
3
|
-
"version": "2.46.
|
|
3
|
+
"version": "2.46.4",
|
|
4
4
|
"description": "A Node.js linter for MediaWiki markup",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@bhsd/code-standard": "^4.1.0",
|
|
110
110
|
"@bhsd/nodejs": "^1.2.1",
|
|
111
|
-
"@bhsd/test-util": "^3.1.
|
|
111
|
+
"@bhsd/test-util": "^3.1.2",
|
|
112
112
|
"c8": "^12.0.0",
|
|
113
113
|
"diff2html-cli": "^5.2.15",
|
|
114
114
|
"esbuild": "^0.28.2",
|
|
115
|
-
"eslint": "^10.
|
|
115
|
+
"eslint": "^10.9.1",
|
|
116
116
|
"markdownlint-cli2": "^0.23.2",
|
|
117
117
|
"mathoid-texvcjs": "^0.6.0",
|
|
118
118
|
"stylelint": "^17.14.1",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"vscode-css-languageservice": "^6.3.10",
|
|
122
122
|
"vscode-html-languageservice": "^5.6.2",
|
|
123
123
|
"vscode-json-languageservice": "^5.7.2",
|
|
124
|
-
"vscode-languageserver-textdocument": "^1.0.
|
|
124
|
+
"vscode-languageserver-textdocument": "^1.0.13"
|
|
125
125
|
},
|
|
126
126
|
"engines": {
|
|
127
127
|
"node": "^20.19.0 || ^22.13.0 || >=24.11.0"
|