Skip to content

regex lint error because of this dependency when using standard #20

@duncdrum

Description

@duncdrum

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions