('a)
with tslint.json configuration:
{ "rules": { "quotemark": true } }
The 'quotemark' rule threw an error in 'test.ts':
SyntaxError: Invalid regular expression: /\\)/: Unmatched ')'
at new RegExp (<anonymous>)
at cb (...\tslint\lib\rules\quotemarkRule.js:106:33)
...
No error.
Looks like the same issue as #3073 and #4181 but those issues got closed as there was no reproducible case.
Ha, thanks for the repro @mjomble! Quotemark bugs have been popping up every now and then...
If the problem is that new RegExp( is taking in an invalid string \\\\${actualQuoteMark}, "g")"/\\)/", it seems like it would be a pretty quick fix to add a case to the actualQuoteMark === expectedQuoteMark if statement to return early if the actualQuoteMark is not a ', ", or ```.
Related: #3808.
Most helpful comment
Ha, thanks for the repro @mjomble! Quotemark bugs have been popping up every now and then...
If the problem is that
new RegExp(is taking in an invalid string\\\\${actualQuoteMark}, "g")"/\\)/", it seems like it would be a pretty quick fix to add a case to theactualQuoteMark === expectedQuoteMarkif statement to return early if theactualQuoteMarkis not a',", or ```.Related: #3808.