Skip to content

Commit

Permalink
♻️ Remove hacky Number conversion
Browse files Browse the repository at this point in the history
Also typescript doesn't recognize this technique
  • Loading branch information
vhoyer committed Jan 25, 2022
1 parent 7c2ac4b commit c108001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/tabindex-no-positive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const rule: Rule.RuleModule = {
VElement(node) {
const tabIndex = getLiteralAttributeValue(node, "tabindex");

if (tabIndex && +tabIndex > 0) {
if (tabIndex && Number(tabIndex) > 0) {
context.report({ node: node as any, messageId: "default" });
}
}
Expand Down

0 comments on commit c108001

Please sign in to comment.