“parserOptions.project” has been set for @typescript-eslint/parser

Different lint rules for JavaScript and TypeScript files The problem happens for one of the reasons below: You’re using a rule which require type information and didn’t specify a parserOptions.project; You specified parserOptions.project, didn’t specify createDefaultProgram (it will be removed in a future version), and you’re linting files not included in the project (e.g. babel.config.js, … Read more

Line 0: Parsing error: Cannot read property ‘map’ of undefined

Edit: as noted by Meng-Yuan Huang, this issue no longer occurs in react-scripts@^4.0.1 This error occurs because react-scripts has a direct dependency on the 2.xx range of @typescript-eslint/parser and @typescript-eslint/eslint-plugin. You can fix this by adding a resolutions field to your package.json as follows: “resolutions”: { “**/@typescript-eslint/eslint-plugin”: “^4.1.1”, “**/@typescript-eslint/parser”: “^4.1.1” } NPM users: add the … Read more