feedback: add case insensitive regexp for img alt check
MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxA11yImgRedundantAlt.test.ts
packages/@romejs/js-compiler/lint/rules/react/jsxA11yImgRedundantAlt.test.ts
@@ -19,6 +19,9 @@ test(
'<img src="src" alt="photo" />',
'<img src="src" alt="picture" />',
'<img src="src" alt="image" />',
+ '<img src="src" alt="Photo" />',
+ '<img src="src" alt="Picture" />',
+ '<img src="src" alt="Image" />',
// VALID
'<img src="src" alt="alt" />',
'<img src="src" alt={photo} />',

MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxA11yImgRedundantAlt.ts
packages/@romejs/js-compiler/lint/rules/react/jsxA11yImgRedundantAlt.ts
@@ -19,7 +19,7 @@ function jsxImgRedundantAlt(node: AnyNode) {
attribute.name.name === 'alt' &&
attribute.value &&
attribute.value.type === 'StringLiteral' &&
- /(image)|(picture)|(photo)/.test(attribute.value.value)
+ /(image)|(picture)|(photo)/i.test(attribute.value.value)
)
);
}

feedback: add case insensitive regexp for img alt check