no ignored - bhsd-harry/wikiparser-node GitHub Wiki

no-ignored

❌ By default, this rule reports content ignored by the Wikitext parser as errors.

Options

Extension tag name

This rule can be configured for specific extension tags (e.g., <references> and <inpubox>) by providing an object with the tag name as the key and the severity as the value.

Examples of incorrect code for { "no-ignored": [ 0, { "inputbox": 2 } ] }:

<inputbox><nowiki/></inputbox>

Examples of correct code for { "no-ignored": [ 2, { "inputbox": 0 } ] }:

<inputbox><nowiki/></inputbox>

arg

This option can be configured to specify the severity of ignored content in template arguments.

Examples of incorrect code for { "no-ignored": [ 0, { "arg": 2 } ] }:

{{{Foo|Bar|Baz}}}

Examples of correct code for { "no-ignored": [ 2, { "arg": 0 } ] }:

{{{Foo|Bar|Baz}}}

closingTag

This option can be configured to specify the severity of ignored attributes of a closing tag.

Examples of incorrect code for { "no-ignored": [ 0, { "closingTag": 2 } ] }:

<p></p id=foo>

Examples of correct code for { "no-ignored": [ 2, { "closingTag": 0 } ] }:

<p></p id=foo>

conversionFlag

This option can be configured to specify the severity of invalid language conversion flags.

Examples of incorrect code for { "no-ignored": [ 0, { "conversionFlag": 2 } ] }:

-{a|Foo}-

Examples of correct code for { "no-ignored": [ 2, { "conversionFlag": 0 } ] }:

-{a|Foo}-

fragment

⚠️ By default, this rule reports useless fragments in category links, file links and templates as warnings. This can be configured by providing a fragment option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "fragment": 2 } ] }:

{{Foo#Bar}}
[[Category:Foo#Bar]]

Examples of correct code for { "no-ignored": [ 2, { "fragment": 0 } ] }:

{{Foo#Bar}}
[[Category:Foo#Bar]]

galleryComment

⚠️ By default, this rule reports multi-line HTML comments inside <gallery> as warnings. This can be configured by providing a galleryComment option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "galleryComment": 2 } ] }:

<gallery>
<!--
-->
</gallery>

Examples of correct code for { "no-ignored": [ 2, { "galleryComment": 0 } ] }:

<gallery>
<!--
-->
</gallery>

galleryImage

This option can be configured to specify the severity of lines with invalid images inside <gallery>.

Examples of incorrect code for { "no-ignored": [ 0, { "galleryImage": 2 } ] }:

<gallery>
{{Foo}}
</gallery>

Examples of correct code for { "no-ignored": [ 2, { "galleryImage": 0 } ] }:

<gallery>
{{Foo}}
</gallery>

galleryNoImage

⚠️ By default, this rule reports lines with image missing inside <gallery> as warnings. This can be configured by providing a galleryNoImage option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "galleryNoImage": 2 } ] }:

<gallery>
|image missing
</gallery>

Examples of correct code for { "no-ignored": [ 2, { "galleryNoImage": 0 } ] }:

<gallery>
|image missing
</gallery>

include

⚠️ By default, this rule reports attributes of <includeonly> as warnings. This can be configured by providing a include option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "include": 2 } ] }:

<includeonly foo/>

Examples of correct code for { "no-ignored": [ 2, { "include": 0 } ] }:

<includeonly foo/>

invalidAttributes

This option can be configured to specify the severity of invalid tag attributes.

Examples of incorrect code for { "no-ignored": [ 0, { "invalidAttributes": 2 } ] }:

{|
!!id=foo|foo
|}

Examples of correct code for { "no-ignored": [ 2, { "invalidAttributes": 0 } ] }:

{|
!!id=foo|foo
|}

nonWordAttributes

⚠️ By default, this rule reports non-word tag attributes as warnings. This can be configured by providing a nonWordAttribute option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "nonWordAttributes": 2 } ] }:

<br |>

Examples of correct code for { "no-ignored": [ 2, { "nonWordAttributes": 0 } ] }:

<br |>

redirect

⚠️ By default, this rule reports link text of redirects as warnings. This can be configured by providing a redirect option with a severity value.

Examples of incorrect code for { "no-ignored": [ 0, { "redirect": 2 } ] }:

#REDIRECT [[Foo|Bar]]

Examples of correct code for { "no-ignored": [ 2, { "redirect": 0 } ] }:

#REDIRECT [[Foo|Bar]]
⚠️ **GitHub.com Fallback** ⚠️