Skip to content

Commit 63dec9f

Browse files
authored
refactor: simplify parseListConfig (#16241)
* refactor: simplify `parseListConfig` Removes a polynomial-time regular expression * remove comment
1 parent 43f03aa commit 63dec9f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/linter/config-comment-parser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ module.exports = class ConfigCommentParser {
131131

132132
const items = {};
133133

134-
// Collapse whitespace around commas
135-
string.replace(/\s*,\s*/gu, ",").split(/,+/u).forEach(name => {
134+
string.split(",").forEach(name => {
136135
const trimmedName = name.trim();
137136

138137
if (trimmedName) {

0 commit comments

Comments
 (0)