This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
parserOptions.ecmaFeatures.jsx option not passed to estree #594
Description
What version of TypeScript are you using?
3.1.1
What version of typescript-eslint-parser
are you using?
21.0.2
What code were you trying to parse?
const RuleTester = require("eslint").RuleTester;
const ruleTester = new RuleTester({
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
parser: "typescript-eslint-parser",
});
ruleTester.run("no-unused-vars", rule, {
valid: [
`
const Foo = function () {}
function render() {
return (<Foo />);
}
`,
],
invalid: [],
})
What did you expect to happen?
The code should parse successfully, so I can test the rule.
What happened?
Parsing error: \'>\' expected.
see astexplorer repl
Note the parser has the jsx
option set to true