deglob icon indicating copy to clipboard operation
deglob copied to clipboard

regex lint error because of this dependency when using standard

Open duncdrum opened this issue 4 years ago • 0 comments

What version of this package are you using? tested on 12, and 14

What operating system, Node.js, and npm version? macOS 11 tested with node 10, 15

What happened? Running standard produces this error

npx standard --fix                                                                                                                                                 ✔ 
/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:307
    ? new RegExp(source, 'i')
      ^

SyntaxError: Invalid regular expression: /(?:^|\/)hs_err_pid[^\/]*\(?=$|\/$)/: Unmatched ')'
    at new RegExp (<anonymous>)
    at makeRegex (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:307:7)
    at createRule (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:355:17)
    at Ignore._addPattern (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:423:20)
    at Array.forEach (<anonymous>)
    at Ignore.add (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:437:7)
    at Ignore.addPattern (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/node_modules/ignore/index.js:450:17)
    at /Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/index.js:109:25
    at Array.forEach (<anonymous>)
    at parseOpts (/Users/halalpha/Documents/exist-gitlab/documentation/node_modules/deglob/index.js:108:18)

What did you expect to happen? standard to ling files

Are you willing to submit a pull request to fix this bug? if someone can confirm that the expression should be /(?:^|\/)hs_err_pid[^\/]*\(?=$|\/$\)/ yes

duncdrum avatar Jun 07 '21 22:06 duncdrum