attribute-duplicate is showing up when it shouldn't
avigoldman opened this issue · comments
Avi Goldman commented
Package's name
emlint
Describe the bug
Duplicate attribute is getting listed when there is inline style.
To Reproduce
Steps to reproduce the behavior:
Run the following JS code:
import {Linter} from 'emlint'
const linter = new Linter()
linter.verify(`<div class="footer">
<div class="social-links">
<a class="social-link" href="https://twitter.com/useparcel.com" style="background-image: url('https://example.com/twitter.png');"></a>
</div>
</div>`, {rules: {'attribute-duplicate': 2}})
It returns the following:
[
{
"fix": null,
"keepSeparateWhenFixing": false,
"line": 5,
"column": 3,
"severity": 2,
"ruleId": "attribute-duplicate",
"message": "Duplicate attribute \"div\".",
"idxFrom": 200,
"idxTo": 203
}
]
Expected behavior
I'd expect this code to come back as completely valid as an empty array.
Screenshots
N/A
Additional context
Add any other context about the problem here.
Avi Goldman commented
It seems to be tied to the style
attribute. Once that is removed it works correctly.
Roy Revelt commented
Sorry, it's the work-in-progress program; I'm closing this ticket.