Closed pietrofxq closed 5 years ago
"parserOptions": {
"sourceType": "module",
"jsx": true
}
@armano2 thanks... that got rid of the react issues. Now I still have "cannot read property 'name' of null"
This seems to be an issue with vscode-eslint
. Running eslint
in the command line doesn't give me such error, it only shows up in the vscode 'problems' panel
can you try setting up in vscode
eslint.options: options to configure how ESLint is started using the ESLint CLI Engine API. Defaults to an empty option bag. An example to point to a custom .eslintrc.json file is:
{ "eslint.options": { "configFile": "path/.eslintrc.json" } }
looks like its not using
typescript-eslint-parser
same issue :/ I can see that vscode is reading the file because when I change typescript-eslint-parser
to babel-eslint
the error changes instantly. Looks like everything is working properly despite of the error showing up in the "problems" tab, I'll live with it for now
i was able to reproduce it in console :)
and looks like issue is in typescript-estree
ok issue is here https://github.com/eslint/typescript-eslint-parser/blob/master/analyze-scope.js#L323
there is no support for anonymous functions :)
Should hopefully be fixed by #596
to be precise by this commit: https://github.com/eslint/typescript-eslint-parser/pull/596/commits/08f5a74d85c4314ed9039e2afcce54963187bfca
What version of TypeScript are you using? 3.1.1
What version of
typescript-eslint-parser
are you using? 21.0.2Eslint version: 5.12.0
What code were you trying to parse?
and
What did you expect to happen? No eslint errors
What happened?![image](https://user-images.githubusercontent.com/6238029/50793077-4d871100-12c7-11e9-9a3d-27ae54a46f80.png)
.eslintrc:
Am I missing something? Using typescript-eslint-parser disables jsx parsing even though I have
jsx:true
inparserOptions
and throws thiscannot read property 'name' of null
error.