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.
1 parent bdc8c2c commit 89acdc4Copy full SHA for 89acdc4
src/rules/img-redundant-alt.js
@@ -59,8 +59,7 @@ module.exports = {
59
const redundantWords = REDUNDANT_WORDS.concat(words);
60
61
if (typeof value === 'string' && isVisible) {
62
- const hasRedundancy = redundantWords
63
- .some((word) => Boolean(value.match(new RegExp(`(?!{)\\b${word}\\b(?!})`, 'i'))));
+ const hasRedundancy = Boolean(value.match(new RegExp(`(?!{)\\b(${redundantWords.join('|')})\\b(?!})`, 'i')));
64
65
if (hasRedundancy === true) {
66
context.report({
0 commit comments