diff --git a/packages/babel-core/src/transformation/normalize-file.js b/packages/babel-core/src/transformation/normalize-file.js index d7911cb0d0..ae2d9a1d8c 100644 --- a/packages/babel-core/src/transformation/normalize-file.js +++ b/packages/babel-core/src/transformation/normalize-file.js @@ -49,6 +49,9 @@ export default function normalizeFile( throw new Error("AST root must be a Program or File node"); } } else { + // The parser's AST types aren't fully compatible with the types generated + // by the logic in babel-types. + // $FlowFixMe ast = parser(pluginPasses, options, code); } diff --git a/packages/babel-template/src/parse.js b/packages/babel-template/src/parse.js index 587668ae5f..9186780f1c 100644 --- a/packages/babel-template/src/parse.js +++ b/packages/babel-template/src/parse.js @@ -142,6 +142,7 @@ function parseWithCodeFrame(code: string, parserOpts: {}): BabelNodeFile { }; try { + // $FlowFixMe - The parser AST is not the same type as the babel-types type. return parse(code, parserOpts); } catch (err) { const loc = err.loc;