diff --git a/package.json b/package.json index c1d3632..79a86bf 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "eslint-plugin-n": "^16.0.0", "eslint-plugin-node-dependencies": "^0.11.0", "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-regexp": "^1.0.0", + "eslint-plugin-regexp": "^2.0.0", "eslint-plugin-vue": "^9.0.0", "mocha": "^10.0.0", "nyc": "^15.1.0", diff --git a/src/parser/validate.ts b/src/parser/validate.ts index 6daf9b8..e2277b9 100644 --- a/src/parser/validate.ts +++ b/src/parser/validate.ts @@ -26,9 +26,9 @@ import type { JSONIdentifier } from "./ast"; import type { JSONSyntaxContext } from "./syntax-context"; const lineBreakPattern = /\r\n|[\n\r\u2028\u2029]/u; -const octalNumericLiteralPattern = /^0[Oo]/u; +const octalNumericLiteralPattern = /^0o/iu; const legacyOctalNumericLiteralPattern = /^0\d/u; -const binaryNumericLiteralPattern = /^0[Bb]/u; +const binaryNumericLiteralPattern = /^0b/iu; const unicodeCodepointEscapePattern = /\\u\{[\dA-Fa-f]+\}/uy;