wikilint 2.37.1 → 2.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.d.mts +3 -2
- package/dist/base.d.ts +3 -2
- package/dist/base.js +1 -0
- package/dist/base.mjs +1 -0
- package/dist/bin/config.js +5 -4
- package/dist/index.js +2 -2
- package/dist/lib/lintConfig.js +6 -3
- package/dist/lib/lsp.d.ts +3 -1
- package/dist/lib/lsp.js +21 -16
- package/dist/lib/title.js +1 -0
- package/dist/src/link/base.js +1 -0
- package/dist/src/link/file.js +12 -0
- package/dist/src/nowiki/index.js +1 -0
- package/dist/src/table/base.d.ts +5 -0
- package/dist/src/table/base.js +3 -2
- package/dist/src/transclude.js +1 -0
- package/dist/util/sharable.js +1 -1
- package/dist/util/sharable.mjs +2 -2
- package/i18n/en.json +1 -0
- package/i18n/zh-hans.json +1 -0
- package/i18n/zh-hant.json +1 -0
- package/package.json +11 -11
package/dist/base.d.mts
CHANGED
|
@@ -44,7 +44,7 @@ export declare const stages: {
|
|
|
44
44
|
converter: number;
|
|
45
45
|
};
|
|
46
46
|
export type Stage = keyof typeof stages;
|
|
47
|
-
export declare const rules: readonly ["arg-in-ext", "bold-header", "format-leakage", "fostered-content", "h1", "illegal-attr", "insecure-style", "invalid-gallery", "invalid-imagemap", "invalid-invoke", "invalid-isbn", "invalid-json", "invalid-url", "lonely-apos", "lonely-bracket", "lonely-http", "nested-link", "no-arg", "no-duplicate", "no-ignored", "obsolete-attr", "obsolete-tag", "parsing-order", "pipe-like", "syntax-like", "table-layout", "tag-like", "unbalanced-header", "unclosed-comment", "unclosed-quote", "unclosed-table", "unescaped", "unknown-page", "unmatched-tag", "unterminated-url", "url-encoding", "var-anchor", "void-ext", "invalid-css", "invalid-math"];
|
|
47
|
+
export declare const rules: readonly ["arg-in-ext", "blank-alt", "bold-header", "format-leakage", "fostered-content", "h1", "illegal-attr", "insecure-style", "invalid-gallery", "invalid-imagemap", "invalid-invoke", "invalid-isbn", "invalid-json", "invalid-url", "lonely-apos", "lonely-bracket", "lonely-http", "nested-link", "no-arg", "no-duplicate", "no-ignored", "obsolete-attr", "obsolete-tag", "parsing-order", "pipe-like", "syntax-like", "table-layout", "tag-like", "unbalanced-header", "unclosed-comment", "unclosed-quote", "unclosed-table", "unescaped", "unknown-page", "unmatched-tag", "unterminated-url", "url-encoding", "var-anchor", "void-ext", "invalid-css", "invalid-math"];
|
|
48
48
|
export declare namespace LintError {
|
|
49
49
|
type Severity = 'error' | 'warning';
|
|
50
50
|
type Rule = typeof rules[number];
|
|
@@ -124,7 +124,7 @@ export interface LanguageService {
|
|
|
124
124
|
*
|
|
125
125
|
* 销毁实例
|
|
126
126
|
*/
|
|
127
|
-
destroy(): void
|
|
127
|
+
destroy(): Promise<void>;
|
|
128
128
|
/**
|
|
129
129
|
* Provide color decorators
|
|
130
130
|
*
|
|
@@ -264,6 +264,7 @@ export interface LanguageService {
|
|
|
264
264
|
* @param user URI for wiki userpage or email address of the user / 维基用户页面地址或用户的电子邮件地址
|
|
265
265
|
*/
|
|
266
266
|
setTargetWikipedia(wiki: string, user: string): Promise<void>;
|
|
267
|
+
[Symbol.dispose](): void;
|
|
267
268
|
}
|
|
268
269
|
export type SeverityLevel = 0 | 1 | 2 | false | 'off' | 'warning' | 'error';
|
|
269
270
|
export type LintConfigValue = SeverityLevel | [SeverityLevel, Record<string, SeverityLevel>?];
|
package/dist/base.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare const stages: {
|
|
|
44
44
|
converter: number;
|
|
45
45
|
};
|
|
46
46
|
export type Stage = keyof typeof stages;
|
|
47
|
-
export declare const rules: readonly ["arg-in-ext", "bold-header", "format-leakage", "fostered-content", "h1", "illegal-attr", "insecure-style", "invalid-gallery", "invalid-imagemap", "invalid-invoke", "invalid-isbn", "invalid-json", "invalid-url", "lonely-apos", "lonely-bracket", "lonely-http", "nested-link", "no-arg", "no-duplicate", "no-ignored", "obsolete-attr", "obsolete-tag", "parsing-order", "pipe-like", "syntax-like", "table-layout", "tag-like", "unbalanced-header", "unclosed-comment", "unclosed-quote", "unclosed-table", "unescaped", "unknown-page", "unmatched-tag", "unterminated-url", "url-encoding", "var-anchor", "void-ext", "invalid-css", "invalid-math"];
|
|
47
|
+
export declare const rules: readonly ["arg-in-ext", "blank-alt", "bold-header", "format-leakage", "fostered-content", "h1", "illegal-attr", "insecure-style", "invalid-gallery", "invalid-imagemap", "invalid-invoke", "invalid-isbn", "invalid-json", "invalid-url", "lonely-apos", "lonely-bracket", "lonely-http", "nested-link", "no-arg", "no-duplicate", "no-ignored", "obsolete-attr", "obsolete-tag", "parsing-order", "pipe-like", "syntax-like", "table-layout", "tag-like", "unbalanced-header", "unclosed-comment", "unclosed-quote", "unclosed-table", "unescaped", "unknown-page", "unmatched-tag", "unterminated-url", "url-encoding", "var-anchor", "void-ext", "invalid-css", "invalid-math"];
|
|
48
48
|
export declare namespace LintError {
|
|
49
49
|
type Severity = 'error' | 'warning';
|
|
50
50
|
type Rule = typeof rules[number];
|
|
@@ -124,7 +124,7 @@ export interface LanguageService {
|
|
|
124
124
|
*
|
|
125
125
|
* 销毁实例
|
|
126
126
|
*/
|
|
127
|
-
destroy(): void
|
|
127
|
+
destroy(): Promise<void>;
|
|
128
128
|
/**
|
|
129
129
|
* Provide color decorators
|
|
130
130
|
*
|
|
@@ -264,6 +264,7 @@ export interface LanguageService {
|
|
|
264
264
|
* @param user URI for wiki userpage or email address of the user / 维基用户页面地址或用户的电子邮件地址
|
|
265
265
|
*/
|
|
266
266
|
setTargetWikipedia(wiki: string, user: string): Promise<void>;
|
|
267
|
+
[Symbol.dispose](): void;
|
|
267
268
|
}
|
|
268
269
|
export type SeverityLevel = 0 | 1 | 2 | false | 'off' | 'warning' | 'error';
|
|
269
270
|
export type LintConfigValue = SeverityLevel | [SeverityLevel, Record<string, SeverityLevel>?];
|
package/dist/base.js
CHANGED
package/dist/base.mjs
CHANGED
package/dist/bin/config.js
CHANGED
|
@@ -16,7 +16,8 @@ const diff_1 = require("../util/diff");
|
|
|
16
16
|
* @param config.articlePath article path
|
|
17
17
|
*/
|
|
18
18
|
const arrToObj = ({ articlePath, ...obj }) => {
|
|
19
|
-
for (const
|
|
19
|
+
for (const k in obj) {
|
|
20
|
+
const v = obj[k];
|
|
20
21
|
if (Array.isArray(v) && v.every(x => typeof x === 'string')) {
|
|
21
22
|
Object.assign(obj, { [k]: Object.fromEntries(v.map(x => [x, true])) });
|
|
22
23
|
}
|
|
@@ -39,7 +40,7 @@ const filterGadget = (id) => {
|
|
|
39
40
|
const n = Number(id);
|
|
40
41
|
return n < 2300 || n > 2303; // Gadget, Gadget talk, Gadget definition, Gadget definition talk
|
|
41
42
|
};
|
|
42
|
-
const pkg = "wikilint", version = "2.
|
|
43
|
+
const pkg = "wikilint", version = "2.38.1";
|
|
43
44
|
/**
|
|
44
45
|
* Get the parser configuration for a Wikimedia Foundation project.
|
|
45
46
|
* @param site site nickname
|
|
@@ -147,9 +148,9 @@ exports.default = async (site, url, user, force, internal) => {
|
|
|
147
148
|
}
|
|
148
149
|
else {
|
|
149
150
|
const oldConfig = arrToObj(require(file)), newConfig = arrToObj(config);
|
|
150
|
-
for (const
|
|
151
|
+
for (const k in newConfig) {
|
|
151
152
|
try {
|
|
152
|
-
strict_1.default.deepStrictEqual(oldConfig[k],
|
|
153
|
+
strict_1.default.deepStrictEqual(oldConfig[k], newConfig[k]);
|
|
153
154
|
}
|
|
154
155
|
catch (e) {
|
|
155
156
|
if (e instanceof strict_1.default.AssertionError) {
|
package/dist/index.js
CHANGED
|
@@ -200,7 +200,7 @@ const Parser = {
|
|
|
200
200
|
catch (e) /* c8 ignore start */ {
|
|
201
201
|
if (e instanceof Error) {
|
|
202
202
|
const file = path_1.default.join(__dirname, '..', 'errors', new Date().toISOString()), stage = token.getAttribute('stage');
|
|
203
|
-
for (const k
|
|
203
|
+
for (const k in config) {
|
|
204
204
|
if (k.startsWith('regex') || config[k] instanceof Set) {
|
|
205
205
|
delete config[k];
|
|
206
206
|
}
|
|
@@ -263,7 +263,7 @@ const def = {
|
|
|
263
263
|
/* NOT FOR BROWSER ONLY */
|
|
264
264
|
'fetchConfig',
|
|
265
265
|
]);
|
|
266
|
-
for (const key
|
|
266
|
+
for (const key in Parser) {
|
|
267
267
|
if (!enumerable.has(key)) {
|
|
268
268
|
def[key] = { enumerable: false };
|
|
269
269
|
}
|
package/dist/lib/lintConfig.js
CHANGED
|
@@ -13,6 +13,7 @@ const dict = new Map([
|
|
|
13
13
|
]);
|
|
14
14
|
const defaultLintRuleConfig = {
|
|
15
15
|
'arg-in-ext': 1,
|
|
16
|
+
'blank-alt': 1,
|
|
16
17
|
'bold-header': [
|
|
17
18
|
1,
|
|
18
19
|
{
|
|
@@ -286,8 +287,8 @@ class LintRuleConfiguration {
|
|
|
286
287
|
if (!config) {
|
|
287
288
|
return;
|
|
288
289
|
}
|
|
289
|
-
for (const
|
|
290
|
-
set(this, key,
|
|
290
|
+
for (const key in config) {
|
|
291
|
+
set(this, key, config[key]);
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
/** @implements */
|
|
@@ -301,6 +302,7 @@ class LintRuleConfiguration {
|
|
|
301
302
|
}
|
|
302
303
|
/** 语法检查设置 */
|
|
303
304
|
class LintConfiguration {
|
|
305
|
+
// @ts-expect-error lazy initialization
|
|
304
306
|
#rules;
|
|
305
307
|
/** @implements */
|
|
306
308
|
get rules() {
|
|
@@ -328,7 +330,8 @@ class LintConfiguration {
|
|
|
328
330
|
else {
|
|
329
331
|
const { rules: ruleConfig, ...other } = (config ?? {});
|
|
330
332
|
this.rules = ruleConfig;
|
|
331
|
-
for (const
|
|
333
|
+
for (const key in other) {
|
|
334
|
+
const value = other[key];
|
|
332
335
|
if (value !== undefined && Object.prototype.hasOwnProperty.call(defaultLintConfig, key)) {
|
|
333
336
|
this[key] = value;
|
|
334
337
|
}
|
package/dist/lib/lsp.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class LanguageService implements LanguageServiceBase {
|
|
|
16
16
|
/** @param uri 任务标识 */
|
|
17
17
|
constructor(uri: object);
|
|
18
18
|
/** @implements */
|
|
19
|
-
destroy(): void
|
|
19
|
+
destroy(): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Provide color decorators
|
|
22
22
|
*
|
|
@@ -160,4 +160,6 @@ export declare class LanguageService implements LanguageServiceBase {
|
|
|
160
160
|
* @since v1.18.1
|
|
161
161
|
*/
|
|
162
162
|
setTargetWikipedia(wiki: string, user: string): Promise<void>;
|
|
163
|
+
/** @implements */
|
|
164
|
+
[Symbol.dispose](): void;
|
|
163
165
|
}
|
package/dist/lib/lsp.js
CHANGED
|
@@ -347,13 +347,19 @@ const getSectionEnd = (section, lines, line) => {
|
|
|
347
347
|
/* NOT FOR BROWSER ONLY END */
|
|
348
348
|
/** VSCode-style language service */
|
|
349
349
|
class LanguageService {
|
|
350
|
+
// @ts-expect-error lazy initialization
|
|
350
351
|
#text;
|
|
352
|
+
// @ts-expect-error lazy initialization
|
|
351
353
|
#text2;
|
|
352
354
|
#running;
|
|
353
355
|
#running2;
|
|
356
|
+
// @ts-expect-error lazy initialization
|
|
354
357
|
#done;
|
|
358
|
+
// @ts-expect-error lazy initialization
|
|
355
359
|
#done2;
|
|
360
|
+
// @ts-expect-error lazy initialization
|
|
356
361
|
#config;
|
|
362
|
+
// @ts-expect-error lazy initialization
|
|
357
363
|
#include;
|
|
358
364
|
#completionConfig;
|
|
359
365
|
/** @since v1.17.1 */
|
|
@@ -364,6 +370,7 @@ class LanguageService {
|
|
|
364
370
|
data;
|
|
365
371
|
/* NOT FOR BROWSER ONLY */
|
|
366
372
|
/** @private */
|
|
373
|
+
// @ts-expect-error lazy initialization
|
|
367
374
|
lilypond;
|
|
368
375
|
#lilypondData;
|
|
369
376
|
#mathData;
|
|
@@ -386,19 +393,12 @@ class LanguageService {
|
|
|
386
393
|
});
|
|
387
394
|
}
|
|
388
395
|
/** @implements */
|
|
389
|
-
destroy() {
|
|
396
|
+
async destroy() {
|
|
390
397
|
Object.setPrototypeOf(this, null);
|
|
391
398
|
/* NOT FOR BROWSER ONLY */
|
|
392
399
|
const dir = path_1.default.join(__dirname, 'lilypond');
|
|
393
400
|
if (fs_1.default.existsSync(dir)) {
|
|
394
|
-
|
|
395
|
-
(async () => {
|
|
396
|
-
try {
|
|
397
|
-
await fs_1.default.promises.unlink(path_1.default.join(dir, file));
|
|
398
|
-
}
|
|
399
|
-
catch { }
|
|
400
|
-
})();
|
|
401
|
-
}
|
|
401
|
+
await Promise.allSettled(fs_1.default.readdirSync(dir).map(file => fs_1.default.promises.unlink(path_1.default.join(dir, file))));
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
/** 检查解析设置有无更新 */
|
|
@@ -623,10 +623,10 @@ class LanguageService {
|
|
|
623
623
|
else if (!isJa) {
|
|
624
624
|
name = name.slice(2, -2);
|
|
625
625
|
}
|
|
626
|
-
if (name
|
|
626
|
+
if (Object.hasOwn(iAlias, name)) {
|
|
627
627
|
name = iAlias[name];
|
|
628
628
|
}
|
|
629
|
-
else if (name
|
|
629
|
+
else if (Object.hasOwn(sAlias, name)) {
|
|
630
630
|
name = sAlias[name];
|
|
631
631
|
}
|
|
632
632
|
return this.#getBehaviorSwitch(name.toLowerCase());
|
|
@@ -661,10 +661,10 @@ class LanguageService {
|
|
|
661
661
|
if (!this.data) {
|
|
662
662
|
return undefined;
|
|
663
663
|
}
|
|
664
|
-
else if (name
|
|
664
|
+
else if (Object.hasOwn(insensitive, name)) {
|
|
665
665
|
name = insensitive[name];
|
|
666
666
|
}
|
|
667
|
-
else if (name
|
|
667
|
+
else if (Object.hasOwn(sensitive, name)) {
|
|
668
668
|
name = sensitive[name];
|
|
669
669
|
}
|
|
670
670
|
return this.#getParserFunction(name.toLowerCase());
|
|
@@ -923,8 +923,9 @@ class LanguageService {
|
|
|
923
923
|
let lilypondDiagnostics = [];
|
|
924
924
|
if (this.lilypond) {
|
|
925
925
|
const tokens = root.querySelectorAll('ext#score').filter(token => {
|
|
926
|
-
const lang = token.getAttr('lang');
|
|
927
|
-
return (lang === undefined || lang === 'lilypond') &&
|
|
926
|
+
const lang = token.getAttr('lang'), { innerText } = token;
|
|
927
|
+
return (lang === undefined || lang === 'lilypond') && innerText?.trim()
|
|
928
|
+
&& !/[#$](?!@?\s*(?:'\s*)?(?:[#"]|-?\.?\d|[a-z_][-:\w]*(?![^)\]}\s])))/iu.test(innerText);
|
|
928
929
|
});
|
|
929
930
|
if (tokens.length > 0) {
|
|
930
931
|
const dir = path_1.default.join(__dirname, 'lilypond');
|
|
@@ -942,7 +943,7 @@ class LanguageService {
|
|
|
942
943
|
fs_1.default.writeFileSync(file, score);
|
|
943
944
|
try {
|
|
944
945
|
// eslint-disable-next-line @typescript-eslint/strict-void-return
|
|
945
|
-
await util_1.default.promisify(child_process_1.execFile)(this.lilypond, ['-s', '-o', dir, file]);
|
|
946
|
+
await util_1.default.promisify(child_process_1.execFile)(this.lilypond, ['-dno-print-pages', '-s', '-o', dir, file]);
|
|
946
947
|
scores.set(score, []);
|
|
947
948
|
}
|
|
948
949
|
catch (e) {
|
|
@@ -1602,5 +1603,9 @@ class LanguageService {
|
|
|
1602
1603
|
}
|
|
1603
1604
|
Object.assign(this.config, { articlePath: `${host}/wiki/` });
|
|
1604
1605
|
}
|
|
1606
|
+
/** @implements */
|
|
1607
|
+
[Symbol.dispose]() {
|
|
1608
|
+
void this.destroy();
|
|
1609
|
+
}
|
|
1605
1610
|
}
|
|
1606
1611
|
exports.LanguageService = LanguageService;
|
package/dist/lib/title.js
CHANGED
package/dist/src/link/base.js
CHANGED
package/dist/src/link/file.js
CHANGED
|
@@ -119,6 +119,18 @@ class FileToken extends base_1.LinkBaseToken {
|
|
|
119
119
|
errors.push(e);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
+
rule = 'blank-alt';
|
|
123
|
+
s = lintConfig.getSeverity(rule);
|
|
124
|
+
if (s) {
|
|
125
|
+
const alt = this.getArg('alt');
|
|
126
|
+
if (alt?.getValue() === '') {
|
|
127
|
+
const e = (0, lint_1.generateForChild)(alt, rect, rule, 'blank-alt', s);
|
|
128
|
+
if (computeEditInfo || fix) {
|
|
129
|
+
e.fix = (0, lint_1.fixByRemove)(e, -1);
|
|
130
|
+
}
|
|
131
|
+
errors.push(e);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
122
134
|
if (args.length === keys.length
|
|
123
135
|
&& frameKeys.length < 2
|
|
124
136
|
&& horizAlignKeys.length < 2
|
package/dist/src/nowiki/index.js
CHANGED
|
@@ -112,6 +112,7 @@ class NowikiToken extends base_1.NowikiBaseToken {
|
|
|
112
112
|
}
|
|
113
113
|
const e = (0, lint_1.generateForSelf)(this, { start }, rule, 'chem-required', s);
|
|
114
114
|
if (result.status !== 'C') {
|
|
115
|
+
/** @todo native MathML supports more macros than texvcjs */
|
|
115
116
|
const { message, location } = result.error, [endIndex, endLine, endCol] = updateLocation(e, location.end, n);
|
|
116
117
|
[e.startIndex, e.startLine, e.startCol] = updateLocation(e, location.start, n);
|
|
117
118
|
Object.assign(e, { endIndex, endLine, endCol, message });
|
package/dist/src/table/base.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ import type { AttributesParentBase } from '../../mixin/attributesParent';
|
|
|
6
6
|
declare type TableTypes = 'table' | 'tr' | 'td';
|
|
7
7
|
export interface TableBaseToken extends AttributesParentBase {
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* 转义表格语法
|
|
11
|
+
* @param syntax 表格语法节点
|
|
12
|
+
*/
|
|
13
|
+
export declare const escapeTable: (syntax: SyntaxToken) => void;
|
|
9
14
|
/**
|
|
10
15
|
* table row that contains the newline at the beginning but not at the end
|
|
11
16
|
*
|
package/dist/src/table/base.js
CHANGED
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.TableBaseToken = void 0;
|
|
40
|
+
exports.TableBaseToken = exports.escapeTable = void 0;
|
|
41
41
|
const debug_1 = require("../../util/debug");
|
|
42
42
|
const attributesParent_1 = require("../../mixin/attributesParent");
|
|
43
43
|
const index_1 = __importDefault(require("../../index"));
|
|
@@ -56,6 +56,7 @@ const escapeTable = (syntax) => {
|
|
|
56
56
|
syntax.safeReplaceChildren(childNodes);
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
+
exports.escapeTable = escapeTable;
|
|
59
60
|
/**
|
|
60
61
|
* table row that contains the newline at the beginning but not at the end
|
|
61
62
|
*
|
|
@@ -93,7 +94,7 @@ let TableBaseToken = (() => {
|
|
|
93
94
|
escape() {
|
|
94
95
|
LSP: for (const child of this.childNodes) {
|
|
95
96
|
if (child instanceof syntax_1.SyntaxToken) {
|
|
96
|
-
escapeTable(child);
|
|
97
|
+
(0, exports.escapeTable)(child);
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
100
|
child.escape();
|
package/dist/src/transclude.js
CHANGED
package/dist/util/sharable.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.extParams = exports.obsoleteAttrs = exports.extAttrs = exports.htmlAttrs = exports.commonHtmlAttrs = void 0;
|
|
4
4
|
/* eslint-disable unicorn/no-unreadable-iife */
|
|
5
|
-
const blockAttrs = new Set(['align']), citeAttrs = new Set(['cite']), citeAndAttrs = new Set(['cite', 'datetime']), widthAttrs = new Set(['width']),
|
|
5
|
+
const blockAttrs = new Set(['align']), citeAttrs = new Set(['cite']), citeAndAttrs = new Set(['cite', 'datetime']), widthAttrs = new Set(['width']), trAttrs = new Set(['bgcolor', 'align', 'valign']), obsoleteTdAttrs = new Set([...trAttrs, 'axis', 'height', 'nowrap', 'width']), tdAttrs = new Set([...obsoleteTdAttrs, 'abbr', 'headers', 'scope', 'rowspan', 'colspan']), typeAttrs = new Set(['type']), obsoleteTableAttrs = new Set(['summary', 'align', 'bgcolor', 'cellpadding', 'cellspacing', 'frame', 'rules', 'width']), brAttrs = new Set(['clear']), chemAttrs = new Set(['id', 'qid', 'forcemathmode', 'type', 'display']), syntaxHighlightAttrs = new Set([
|
|
6
6
|
'enclose',
|
|
7
7
|
'inline',
|
|
8
8
|
'lang',
|
package/dist/util/sharable.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]),
|
|
1
|
+
const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]), trAttrs = /* @__PURE__ */ new Set(["bgcolor", "align", "valign"]), obsoleteTdAttrs = /* @__PURE__ */ new Set([...trAttrs, "axis", "height", "nowrap", "width"]), tdAttrs = /* @__PURE__ */ new Set([...obsoleteTdAttrs, "abbr", "headers", "scope", "rowspan", "colspan"]), typeAttrs = /* @__PURE__ */ new Set(["type"]), obsoleteTableAttrs = /* @__PURE__ */ new Set(
|
|
2
2
|
["summary", "align", "bgcolor", "cellpadding", "cellspacing", "frame", "rules", "width"]
|
|
3
|
-
), brAttrs = /* @__PURE__ */ new Set(["clear"]),
|
|
3
|
+
), brAttrs = /* @__PURE__ */ new Set(["clear"]), chemAttrs = /* @__PURE__ */ new Set(["id", "qid", "forcemathmode", "type", "display"]), syntaxHighlightAttrs = /* @__PURE__ */ new Set([
|
|
4
4
|
"enclose",
|
|
5
5
|
"inline",
|
|
6
6
|
"lang",
|
package/i18n/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"argument-in-ext": "template argument inside an extension tag",
|
|
3
3
|
"attributes-of-closing-tag": "attributes of a closing tag",
|
|
4
|
+
"blank-alt": "blank alt attribute",
|
|
4
5
|
"bold-apostrophes": "bold apostrophes",
|
|
5
6
|
"bold-in-header": "bold text in a section header",
|
|
6
7
|
"chem-required": "chem attribute required",
|
package/i18n/zh-hans.json
CHANGED
package/i18n/zh-hant.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikilint",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1",
|
|
4
4
|
"description": "A Node.js linter for MediaWiki markup",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -89,31 +89,31 @@
|
|
|
89
89
|
"vscode-json-languageservice": "^5.7.2"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@bhsd/code-standard": "^2.
|
|
92
|
+
"@bhsd/code-standard": "^2.2.0",
|
|
93
93
|
"@bhsd/nodejs": "^1.0.0",
|
|
94
|
-
"@bhsd/test-util": "^0.
|
|
94
|
+
"@bhsd/test-util": "^1.0.0",
|
|
95
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
95
96
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
96
97
|
"@types/color-name": "^2.0.0",
|
|
97
98
|
"@types/color-rgba": "^2.1.3",
|
|
98
99
|
"@types/mocha": "^10.0.10",
|
|
99
100
|
"@types/node": "^24.11.0",
|
|
100
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
101
|
-
"@typescript-eslint/parser": "^8.
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
102
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
102
103
|
"c8": "^11.0.0",
|
|
103
104
|
"color-rgba": "^3.0.0",
|
|
104
105
|
"diff2html-cli": "^5.2.15",
|
|
105
|
-
"esbuild": "^0.27.
|
|
106
|
-
"eslint": "^
|
|
107
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
106
|
+
"esbuild": "^0.27.7",
|
|
107
|
+
"eslint": "^10.2.0",
|
|
108
108
|
"eslint-plugin-jsdoc": "^62.7.1",
|
|
109
|
-
"eslint-plugin-jsonc": "^3.1.
|
|
109
|
+
"eslint-plugin-jsonc": "^3.1.2",
|
|
110
110
|
"eslint-plugin-n": "^17.24.0",
|
|
111
111
|
"eslint-plugin-promise": "^7.2.1",
|
|
112
112
|
"eslint-plugin-regexp": "^3.1.0",
|
|
113
|
-
"eslint-plugin-unicorn": "^
|
|
113
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
114
114
|
"markdownlint-cli2": "^0.21.0",
|
|
115
115
|
"mocha": "^11.7.5",
|
|
116
|
-
"typescript": "^
|
|
116
|
+
"typescript": "^6.0.2",
|
|
117
117
|
"v8r": "^6.0.0",
|
|
118
118
|
"vscode-languageserver-textdocument": "^1.0.12"
|
|
119
119
|
},
|