You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest Babel version (7.8.7) is using this package in the latest version (0.6.3), which now produces an error (with Babel 7.8.4 this error did not occur).
This regular expression is an absolutely valid JavaScript expression:
/\{([^}]+)\}/gu
But regjsparser throws the following error:
{code}
Module build failed (from ../node_modules/babel-loader/lib/index.js):
SyntaxError: ...\src\ts\context\i18n\index.tsx: unescaped or unmatched closing brace at position 6
{([^}]+)}
^
at bail (...\node_modules\regjsparser\parser.js:1129:13)
at createCharacter (...\node_modules\regjsparser\parser.js:237:11)
at parseClassAtomNoDash (...\node_modules\regjsparser\parser.js:1105:16)
at parseClassAtom (...\node_modules\regjsparser\parser.js:1094:16)
at parseNonemptyClassRanges (...\node_modules\regjsparser\parser.js:1052:18)
at parseClassRanges (...\node_modules\regjsparser\parser.js:1008:15)
at parseCharacterClass (...\node_modules\regjsparser\parser.js:986:15)
at parseAtom (...\node_modules\regjsparser\parser.js:649:22)
at parseTerm (...\node_modules\regjsparser\parser.js:490:18)
at parseAlternative (...\node_modules\regjsparser\parser.js:463:21)
at parseDisjunction (...\node_modules\regjsparser\parser.js:443:16)
at finishGroup (...\node_modules\regjsparser\parser.js:520:18)
at parseGroup (...\node_modules\regjsparser\parser.js:516:14)
at parseAtom (...\node_modules\regjsparser\parser.js:665:16)
at parseTerm (...\node_modules\regjsparser\parser.js:490:18)
at parseAlternative (...\node_modules\regjsparser\parser.js:463:21)
{code}
If I escape the }, this error does is gone:
/\{([^\}]+)\}/gu
but here, the ESLint rule "no-useless-escape", correctly complains about the useless escaping.
The text was updated successfully, but these errors were encountered:
The latest Babel version (7.8.7) is using this package in the latest version (0.6.3), which now produces an error (with Babel 7.8.4 this error did not occur).
This regular expression is an absolutely valid JavaScript expression:
But regjsparser throws the following error:
{code}
Module build failed (from ../node_modules/babel-loader/lib/index.js):
SyntaxError: ...\src\ts\context\i18n\index.tsx: unescaped or unmatched closing brace at position 6
{([^}]+)}
^
at bail (...\node_modules\regjsparser\parser.js:1129:13)
at createCharacter (...\node_modules\regjsparser\parser.js:237:11)
at parseClassAtomNoDash (...\node_modules\regjsparser\parser.js:1105:16)
at parseClassAtom (...\node_modules\regjsparser\parser.js:1094:16)
at parseNonemptyClassRanges (...\node_modules\regjsparser\parser.js:1052:18)
at parseClassRanges (...\node_modules\regjsparser\parser.js:1008:15)
at parseCharacterClass (...\node_modules\regjsparser\parser.js:986:15)
at parseAtom (...\node_modules\regjsparser\parser.js:649:22)
at parseTerm (...\node_modules\regjsparser\parser.js:490:18)
at parseAlternative (...\node_modules\regjsparser\parser.js:463:21)
at parseDisjunction (...\node_modules\regjsparser\parser.js:443:16)
at finishGroup (...\node_modules\regjsparser\parser.js:520:18)
at parseGroup (...\node_modules\regjsparser\parser.js:516:14)
at parseAtom (...\node_modules\regjsparser\parser.js:665:16)
at parseTerm (...\node_modules\regjsparser\parser.js:490:18)
at parseAlternative (...\node_modules\regjsparser\parser.js:463:21)
{code}
If I escape the
}
, this error does is gone:but here, the ESLint rule "no-useless-escape", correctly complains about the useless escaping.
The text was updated successfully, but these errors were encountered: