Skip to content

Commit

Permalink
Minor legibility cleanup (#14448)
Browse files Browse the repository at this point in the history
  • Loading branch information
conartist6 committed May 2, 2022
1 parent 0b5b009 commit 7129096
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/babel-plugin-syntax-jsx/src/index.ts
Expand Up @@ -7,17 +7,14 @@ export default declare(api => {
name: "syntax-jsx",

manipulateOptions(opts, parserOpts) {
const { plugins } = parserOpts;
// If the Typescript plugin already ran, it will have decided whether
// or not this is a TSX file.
if (
parserOpts.plugins.some(
p => (Array.isArray(p) ? p[0] : p) === "typescript",
)
) {
if (plugins.some(p => (Array.isArray(p) ? p[0] : p) === "typescript")) {
return;
}

parserOpts.plugins.push("jsx");
plugins.push("jsx");
},
};
});

0 comments on commit 7129096

Please sign in to comment.