Skip to content

Commit 8c7b0f8

Browse files
committed
chore(@putout/engine-parser) rm useless isJSX
1 parent 0f51dfa commit 8c7b0f8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/engine-parser/lib/custom-parser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ const tenko = require('./parsers/tenko');
88

99
const isObject = (a) => typeof a === 'object';
1010

11-
module.exports = (source, {parser, isTS, isFlow, isJSX}) => {
11+
module.exports = (source, {parser, isTS, isFlow}) => {
1212
if (parser === 'babel')
1313
return babel.parse(source, {
1414
isTS,
1515
isFlow,
16-
isJSX,
1716
});
1817

1918
if (isObject(parser))

packages/engine-parser/lib/parse.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,26 @@ function parse(source, options) {
1212
parser,
1313
isTS,
1414
isFlow,
15-
isJSX,
1615
} = options || {};
1716

1817
const ast = recast.parse(source, {
1918
parser: getParser({
2019
parser,
2120
isTS,
2221
isFlow,
23-
isJSX,
2422
}),
2523
});
2624

2725
return ast;
2826
}
2927

30-
function getParser({parser = 'babel', isTS, isFlow, isJSX}) {
28+
function getParser({parser = 'babel', isTS, isFlow}) {
3129
return {
3230
parse(source) {
3331
return toBabel(customParser(source, {
3432
parser,
3533
isTS,
3634
isFlow,
37-
isJSX,
3835
}));
3936
},
4037
};

0 commit comments

Comments
 (0)