We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
img-redundant-alt
some
1 parent 89acdc4 commit 42098b9Copy full SHA for 42098b9
src/rules/img-redundant-alt.js
@@ -59,7 +59,7 @@ module.exports = {
59
const redundantWords = REDUNDANT_WORDS.concat(words);
60
61
if (typeof value === 'string' && isVisible) {
62
- const hasRedundancy = Boolean(value.match(new RegExp(`(?!{)\\b(${redundantWords.join('|')})\\b(?!})`, 'i')));
+ const hasRedundancy = new RegExp(`(?!{)\\b(${redundantWords.join('|')})\\b(?!})`, 'i').test(value);
63
64
if (hasRedundancy === true) {
65
context.report({
0 commit comments