Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
This issue was initially reported here:eslint/typescript-eslint-parser#594
What version of TypeScript are you using?
3.1.1
What version oftypescript-eslint-parser
are you using?
21.0.2
What code were you trying to parse?
constRuleTester=require("eslint").RuleTester;construleTester=newRuleTester({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 thejsx
option set to true