fix(parser): [Babel8] Align error codes between Flow and TypeScript (#13294)

* Align error codes between Flow and TypeScript

* Implement compat fallback in makeErrorTemplates

* Add tests
This commit is contained in:
Sosuke Suzuki
2021-08-28 22:41:54 +09:00
committed by GitHub
parent 38d70e2da9
commit 64d116bd6a
5 changed files with 40 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ const JsxErrors = makeErrorTemplates(
"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?",
},
/* code */ ErrorCodes.SyntaxError,
/* syntaxPlugin */ "jsx",
);
/* eslint-disable sort-keys */