no duplicate - bhsd-harry/wikiparser-node GitHub Wiki
❌ By default, this rule reports duplicate attributes, categories, templates parameters, etc. as errors.
Examples of correct code for { "no-duplicate": 2 }:
<span id="mw-customcollapsible-foo">1</span>
<span id="mw-customcollapsible-foo">2</span>{{Foo|bar=<ref name="1">1</ref>|bar=<ref name="2">2</ref>}}This rule can be configured for specific extension tags (e.g., <dynamicpagelist>, <inputbox> and <seo>) by providing an object with the tag name as the key and the severity as the value.
Examples of incorrect code for { "no-duplicate": [ 0, { "dynamicpagelist": 2 } ] }:
<dynamicpagelist>
count = 5
count = 10
</dynamicpagelist>Examples of correct code for { "no-duplicate": { "dynamicpagelist": 0 } }:
<dynamicpagelist>
count = 5
count = 10
</dynamicpagelist>Examples of incorrect code for { "no-duplicate": [ 0, { "inputbox": 2 } ] }:
<inputbox>
type = create
TYPE = search
</inputbox>Examples of correct code for { "no-duplicate": { "inputbox": 0 } }:
<inputbox>
type = create
TYPE = search
</inputbox>Examples of incorrect code for { "no-duplicate": [ 0, { "seo": 2 } ] }:
<seo>
|title = Foo
|title = Bar
</seo>Examples of correct code for { "no-duplicate": { "seo": 0 } }:
<seo>
|title = Foo
|title = Bar
</seo>This option can be configured to specify the severity of duplicate attributes.
Examples of incorrect code for { "no-duplicate": [ 0, { "attribute": 2 } ] }:
<br id=foo id=bar>Examples of correct code for { "no-duplicate": { "attribute": 0 } }:
<br id=foo id=bar>category option with a severity value.
Examples of incorrect code for { "no-duplicate": [ 0, { "category": 2 } ] }:
[[Category:Foo]]
[[Category:Foo]]Examples of correct code for { "no-duplicate": { "category": 0 } }:
[[Category:Foo]]
[[Category:Foo]]id option with a severity value. See also: Help:Lint errors/duplicate-ids.
Examples of incorrect code for { "no-duplicate": [ 0, { "id": 2 } ] }:
<br id="foo"><br id="foo">Examples of correct code for { "no-duplicate": { "id": 0 } }:
<br id="foo"><br id="foo">This option can be configured to specify the severity of duplicate image parameters. See also: Help:Lint errors/bogus-image-options.
Examples of incorrect code for { "no-duplicate": [ 0, { "imageParameter": 2 } ] }:
[[File:Foo.jpg|alt=1|alt=2]][[File:Foo.jpg|Bar|Baz]][[File:Foo.jpg|frame|thumb]][[File:Foo.jpg|none|left]][[File:Foo.jpg|top|middle]]Examples of correct code for { "no-duplicate": { "imageParameter": 0 } }:
[[File:Foo.jpg|alt=1|alt=2]][[File:Foo.jpg|Bar|Baz]][[File:Foo.jpg|frame|thumb]][[File:Foo.jpg|none|left]][[File:Foo.jpg|top|middle]]This option can be configured to specify the severity of duplicate template parameters.
Examples of incorrect code for { "no-duplicate": [ 0, { "parameter": 2 } ] }:
{{Foo|bar=1|bar=2}}Examples of correct code for { "no-duplicate": { "parameter": 0 } }:
{{Foo|bar=1|bar=2}}unknownImageParameter option with a severity value.
Examples of incorrect code for { "no-duplicate": [ 0, { "unknownImageParameter": 2 } ] }:
[[File:Foo.ogg|muted|loop]][[File:Foo.jpg|{{Bar}}|Baz]][[File:Foo.jpg|link=//{{Bar}}|Baz]]Examples of correct code for { "no-duplicate": { "unknownImageParameter": 0 } }:
[[File:Foo.ogg|muted|loop]][[File:Foo.jpg|{{Bar}}|Baz]][[File:Foo.jpg|link=//{{Bar}}|Baz]]