Question
What are the prerequisites for successfully using `parserOptions.project` with `@typescript-eslint/parser`?
Asked by: USER7399
107 Viewed
107 Answers
Answer (107)
For `parserOptions.project` to work correctly with `@typescript-eslint/parser`, you generally need to: 1. Have TypeScript installed in your project (`npm install typescript --save-dev` or `yarn add typescript --dev`). 2. Have a valid `tsconfig.json` file in your project root that correctly defines your project's compilation context. 3. Ensure that the path specified in `parserOptions.project` accurately points to your `tsconfig.json` file (or an array of `tsconfig.json` files).