Skip to content

Commit

Permalink
fixing casing issue on aria-props
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallgassner committed Oct 15, 2019
1 parent 00926f2 commit 2529ad3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rules/aria-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ module.exports = {
create: context => ({
JSXAttribute: (attribute) => {
const name = propName(attribute);
const normalizedName = name.toLowerCase();

// `aria` needs to be prefix of property.
if (normalizedName.indexOf('aria-') !== 0) {
if (name.indexOf('aria-') !== 0) {
return;
}

const isValid = ariaAttributes.indexOf(normalizedName) > -1;
const isValid = ariaAttributes.indexOf(name) > -1;

if (isValid === false) {
context.report({
Expand Down

0 comments on commit 2529ad3

Please sign in to comment.