Skip to content

Commit

Permalink
style: make an exception to eslint rule no-new for regexp named group…
Browse files Browse the repository at this point in the history
…s test
  • Loading branch information
m59peacemaker committed Sep 5, 2019
1 parent b923e9d commit b710b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/regexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Support until Jan 2020 (https://github.com/nodejs/Release)
const RegExp = (() => {
try {
new RegExp('(?<test>a)')
new RegExp('(?<test>a)') // eslint-disable-line no-new
return RegExp
} catch (error) {
return require('named-regexp-groups')
Expand Down

0 comments on commit b710b82

Please sign in to comment.