Rules - bhsd-harry/wikiparser-node GitHub Wiki
name | Description |
---|---|
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. |
invalid-gallery | Invalid images or image parameters in <gallery> tags. |
invalid-imagemap | Invalid images or links in <imagemap> tags. |
invalid-invoke | Invalid Scribunto module invocation. |
invalid-isbn | Invalid ISBN. |
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 ` |
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
, 1
, or 2
:
-
0
: Disable the rule. -
1
: Warn when the rule is violated. -
2
: Error when the rule is violated.
You can also add an additional object for fine-tuning the rule, such as [2, {"key": "value"}]
. Read the documentation of each rule for more details.
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. 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.