Search code examples
angulareslinttslinteslintrcnrwl

what does eslint parseroptions.project do?


After migrating my Angular 12 project from TSLint to ESLint, an eslintrc file was created per project, each with a line setting the parseroptions.projects to a route like this:

{
  "extends": ["../../.eslintrc.json"],
  "ignorePatterns": ["!**/*"],
  "overrides": [
    {     
      "parserOptions": {
        "project": ["apps/my-app/tsconfig.*?.json"]
      },
    ...
    ],
    ...
}

I've been reading the eslint documentation trying to find the answer to this question, but haven't found anything of use.


Solution

  • This is an additional configuration option exposed by the @typescript-eslint plugin. This option is required if one wants to use eslint rules that require type information.

    See https://www.npmjs.com/package/@typescript-eslint/parser for more info (search for parserOptions.project).