-
Notifications
You must be signed in to change notification settings - Fork 3
Rules
| name | Description |
|---|---|
| arg-in-ext |
{{{}}} inside extension tags. |
| bold-header | Bold apostrophes or HTML tags in headers. |
| format-leakage | Format leakage can occur in the TOC when a formatting tag is not closed in the header. |
| fostered-content | Fostered table content that will be moved outside the table. |
| h1 |
<h1> tags should not be used. |
| illegal-attr | Illegal attributes in extension/HTML tags. |
| insecure-style | Insecure inline styles in HTML tags. |
| invalid-css | Invalid inline styles. Require vscode-css-languageservice in the Node.js environment. |
| invalid-gallery | Invalid files or image parameters, including those in <gallery> tags. |
| invalid-imagemap | Invalid images or links in <imagemap> tags. |
| invalid-invoke | Invalid Scribunto module invocation. |
| invalid-isbn | Invalid ISBN. |
| invalid-math | Invalid syntax in <math>, <chem> and <ce> tags. Require texvcjs in the Node.js environment. |
| invalid-url | Invalid external URLs. |
| lonely-apos | Lonely apostrophes. |
| lonely-bracket | Lonely square brackets or curly braces. |
| lonely-http | Lonely http:// or https:// or PMID or RFC or ISBN. |
| nested-link | An internal link inside an external link. |
| no-arg |
{{{}}} should only be used for transclusion. |
| no-duplicate | Duplicate attributes, categories, templates parameters, etc. |
| no-ignored | Content ignored by the Wikitext parser. |
| obsolete-attr | Obsolete attributes in HTML5. |
| obsolete-tag | Obsolete HTML tags in HTML5. |
| parsing-order | Unexpected behaviors due to the parsing order of Wikitext. |
| pipe-like | Plain-text | characters that look like Wikitext syntax. |
| required-attr | Missing required attributes in extension tags. |
| syntax-like | Plain-text characters that look like Wikitext syntax. |
| table-layout | Inconsistent table layout in terms of row spans and column spans. |
| tag-like | Plain-text < that looks like HTML or extension tags. |
| unbalanced-header | Unbalanced headers, such as starting with == but ending with ===. |
| unclosed-comment | Unclosed HTML comments. |
| unclosed-quote | Unclosed quotes in tag attributes. |
| unclosed-table | Unclosed Wikitext table. |
| unescaped | Unescaped = in external URLs interferes with template parameter parsing. |
| unknown-page | Templates in link targets. |
| unmatched-tag | Unmatched HTML tags. |
| unterminated-url | External URLs containing pipes or full-width punctuation marks. |
| url-encoding | URL encoding in internal links is unnecessary. |
| var-anchor | Anchors that may change due to changes in other parts of the page. |
| void-ext | Void extension tags containing content. |
You can configure individual rules in the rules field of your linter configuration:
{
"rules": {
"rule-name": 2
}
}For each rule, you can configure its severity using 0 | false | 'off', 1 | 'warning', or 2 | 'error':
-
0 | false | 'off': Disable the rule. -
1 | 'warning': Warn when the rule is violated. -
2 | 'error': Error when the rule is violated.
You can also add an additional object for fine-tuning the rule, such as [2, {"key": "value"}]. If the rule has default options, user-provided options will replace the default options entirely. Read the documentation of each rule for more details.
You can also use a single plain object for fine-tuning, such as {"key": "value"}, which will be merged with the default options of the rule. This is equivalent to [defaultSeverity, {...defaultOptions, "key": "value"}], where defaultSeverity is the default severity level of the rule and defaultOptions are the default options of the rule.
When this option is enabled, the linter will compute quick fixes or suggestions for individual issues. This may slow down the linting process. It is enabled by default, but you can disable it in your linter configuration:
{
"computeEditInfo": false
}When this option is enabled, the linter will compute fix-all suggestions for the entire document (available as the output property). This may slow down the linting process. It is enabled by default, but you can disable it in your linter configuration:
{
"fix": false
}When this option is enabled, the linter will ignore inline configuration comments. It is disabled by default, but you can enable it in your linter configuration:
{
"ignoreDisables": true
}You can customize the inline configuration comment keywords. By default, they are lint-disable, lint-enable, lint-disable-line, and lint-disable-next-line. You can change the default prefix lint in your linter configuration:
{
"configurationComment": "wikilint"
}You can disable specific rules or all rules for a specific range of lines using comments:
<!-- lint-disable rule1, rule2 -->
Content that you want to ignore.
<!-- lint-enable rule1, rule2 -->
Line that you want to ignore.<!-- lint-disable-line rule1, rule2 -->
<!-- lint-disable-next-line rule1, rule2 -->
Line that you want to ignore.对维基文本批量执行语法检查的命令行工具
轻量级的维基模板解析器
维基文本语言服务器协议实现
用于维基文本的 VS Code 扩展
A command-line tool that performs linting on Wikitext in bulk
A lightweight Wikitext template parser
An implementation of the Language Server Protocol for Wikitext
VS Code extension for Wikitext