Skip to content

Commit

Permalink
Escape square brackets before globby fixes stylelint#4855
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunsuk Jo committed Jul 13, 2020
1 parent 909063d commit aa91eb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/standalone.js
Expand Up @@ -184,6 +184,9 @@ module.exports = function (options) {
fileCache.destroy();
}

// Escape square brackets
fileList = fileList.map((p) => p.replace(/(.*)\[(.*)\](.*)/g, '$1\\[$2\\]$3'));

return globby(fileList, globbyOptions)
.then((filePaths) => {
// The ignorer filter needs to check paths relative to cwd
Expand Down

0 comments on commit aa91eb8

Please sign in to comment.