Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Fix: support ecmaFeatures.jsx flag #595

Closed
wants to merge 6 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ exports.parseForESLint = function parseForESLint(code, options) {
options = Object.assign({}, options, { jsx: tsx });
}
}
if (options.ecmaFeatures && typeof options.ecmaFeatures.jsx === "boolean") {
// allow the user to override the jsx setting
options.jsx = options.ecmaFeatures.jsx;
}

const ast = parse(code, options);
const extraOptions = {
Expand Down