Skip to content

Commit

Permalink
Add loc back for typescript parser (#9053)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Aug 25, 2020
1 parent 720177a commit 2a15e27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/language-js/parser-typescript.js
Expand Up @@ -36,6 +36,9 @@ function parse(text, parsers, opts) {
function tryParseTypeScript(text, jsx) {
const parser = require("@typescript-eslint/typescript-estree");
return parser.parse(text, {
// `jest@<=26.4.2` rely on `loc`
// https://github.com/facebook/jest/issues/10444
loc: true,
range: true,
comment: true,
useJSXTextNode: true,
Expand Down

0 comments on commit 2a15e27

Please sign in to comment.