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 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
@@ -34,6 +34,7 @@ exports.stages = (() => {
34
34
  exports.rules = (() => {
35
35
  const arr = [
36
36
  'arg-in-ext',
37
+ 'blank-alt',
37
38
  'bold-header',
38
39
  'format-leakage',
39
40
  'fostered-content',
package/dist/base.mjs CHANGED
@@ -31,6 +31,7 @@ const stages = /* @__PURE__ */ (() => {
31
31
  const rules = /* @__PURE__ */ (() => {
32
32
  const arr = [
33
33
  "arg-in-ext",
34
+ "blank-alt",
34
35
  "bold-header",
35
36
  "format-leakage",
36
37
  "fostered-content",
@@ -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 [k, v] of Object.entries(obj)) {
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.37.1";
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 [k, v] of Object.entries(newConfig)) {
151
+ for (const k in newConfig) {
151
152
  try {
152
- strict_1.default.deepStrictEqual(oldConfig[k], v);
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 of Object.keys(config)) {
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 of Object.keys(Parser)) {
266
+ for (const key in Parser) {
267
267
  if (!enumerable.has(key)) {
268
268
  def[key] = { enumerable: false };
269
269
  }
@@ -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 [key, value] of Object.entries(config)) {
290
- set(this, key, value);
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 [key, value] of Object.entries(other)) {
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
- for (const file of fs_1.default.readdirSync(dir)) {
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 in iAlias) {
626
+ if (Object.hasOwn(iAlias, name)) {
627
627
  name = iAlias[name];
628
628
  }
629
- else if (name in sAlias) {
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 in insensitive) {
664
+ else if (Object.hasOwn(insensitive, name)) {
665
665
  name = insensitive[name];
666
666
  }
667
- else if (name in sensitive) {
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') && token.innerText;
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
@@ -17,6 +17,7 @@ const resolve = (title) => {
17
17
  * MediaWiki页面标题对象
18
18
  */
19
19
  class Title {
20
+ // @ts-expect-error lazy initialization
20
21
  #main;
21
22
  #namespaces;
22
23
  #path;
@@ -70,6 +70,7 @@ let LinkBaseToken = (() => {
70
70
  }
71
71
  #bracket = true;
72
72
  #delimiter;
73
+ // @ts-expect-error lazy initialization
73
74
  #title;
74
75
  /** full link / 完整链接 */
75
76
  get link() {
@@ -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
@@ -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 });
@@ -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
  *
@@ -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();
@@ -77,6 +77,7 @@ let TranscludeToken = (() => {
77
77
  #raw = false;
78
78
  #args = new Map();
79
79
  #anonCount = 0;
80
+ // @ts-expect-error lazy initialization
80
81
  #title;
81
82
  get type() {
82
83
  return this.#type;
@@ -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']), obsoleteTdAttrs = new Set(['axis', 'align', 'bgcolor', 'height', 'width', 'valign']), 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']), trAttrs = new Set(['bgcolor', 'align', 'valign']), chemAttrs = new Set(['id', 'qid', 'forcemathmode', 'type', 'display']), syntaxHighlightAttrs = new Set([
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',
@@ -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"]), obsoleteTdAttrs = /* @__PURE__ */ new Set(["axis", "align", "bgcolor", "height", "width", "valign"]), tdAttrs = /* @__PURE__ */ new Set([...obsoleteTdAttrs, "abbr", "headers", "scope", "rowspan", "colspan"]), typeAttrs = /* @__PURE__ */ new Set(["type"]), obsoleteTableAttrs = /* @__PURE__ */ new Set(
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"]), trAttrs = /* @__PURE__ */ new Set(["bgcolor", "align", "valign"]), chemAttrs = /* @__PURE__ */ new Set(["id", "qid", "forcemathmode", "type", "display"]), syntaxHighlightAttrs = /* @__PURE__ */ new Set([
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
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "argument-in-ext": "扩展标签内的模板参数",
3
3
  "attributes-of-closing-tag": "结束标签的属性",
4
+ "blank-alt": "空的alt属性",
4
5
  "bold-apostrophes": "粗体撇号",
5
6
  "bold-in-header": "章节标题中的加粗文本",
6
7
  "chem-required": "需要chem属性",
package/i18n/zh-hant.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "argument-in-ext": "擴充標籤內的模板參數",
3
3
  "attributes-of-closing-tag": "結束標籤的屬性",
4
+ "blank-alt": "空的alt屬性",
4
5
  "bold-apostrophes": "粗體撇號",
5
6
  "bold-in-header": "章節標題中的粗體文字",
6
7
  "chem-required": "需要chem屬性",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikilint",
3
- "version": "2.37.1",
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.1.1",
92
+ "@bhsd/code-standard": "^2.2.0",
93
93
  "@bhsd/nodejs": "^1.0.0",
94
- "@bhsd/test-util": "^0.4.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.57.0",
101
- "@typescript-eslint/parser": "^8.57.0",
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.4",
106
- "eslint": "^9.39.4",
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.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": "^63.0.0",
113
+ "eslint-plugin-unicorn": "^64.0.0",
114
114
  "markdownlint-cli2": "^0.21.0",
115
115
  "mocha": "^11.7.5",
116
- "typescript": "^5.9.3",
116
+ "typescript": "^6.0.2",
117
117
  "v8r": "^6.0.0",
118
118
  "vscode-languageserver-textdocument": "^1.0.12"
119
119
  },