Skip to content

rule no duplication id and name

Hanxing Yang edited this page Jul 10, 2016 · 2 revisions

name

no-duplication-id-and-name

description

Element's id and name should be unique in page. If found not, it reports.

ref: #82

sample

<!-- Bad -->
<div id="test"></div>
<i name="test"></i>
<span id="test"></span>
<p name="test"></p>

<!-- Good -->
<div id="test-id"></div>
<i name="test-name"></i>
<span id="another-id"></span>
<p name="another-name"></p>

code

  • 043

    Duplicated id / name found.

config

  • true

    Do check / format.

  • false

    Do not check / format.

format support

No.