Skip to content

Commit 791996d

Browse files
fiskersindresorhus
authored andcommitted
Remove prevent-abbreviations useless g flag in words split RegExp (#380)
1 parent 8a999c0 commit 791996d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/prevent-abbreviations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ const getNameReplacements = (name, {replacements, whitelist}, limit = 3) => {
285285
}
286286

287287
// Split words
288-
const words = name.split(/(?=[^a-z])|(?<=[^a-zA-Z])/g).filter(Boolean);
288+
const words = name.split(/(?=[^a-z])|(?<=[^a-zA-Z])/).filter(Boolean);
289289

290290
let hasReplacements = false;
291291
const combinations = words.map(word => {

0 commit comments

Comments
 (0)