Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: Support multiple parserOptions.project => tsconfig.json files #47

Open
Juice10 opened this issue Apr 9, 2022 · 0 comments

Comments

@Juice10
Copy link

Juice10 commented Apr 9, 2022

Given have a project that looks like this:

--
  - .eslintrc.js (with `extends: ["auto"]`)
  - tsconfig.json (with  `"exclude": ["test"]`)
  - src/
    - ...
  - test/
    - tsconfig.json (with `"include": ["*.spec.ts"]`)
    - many-tests.spec.ts

Running eslint for the test directory will cause the following error:

/.../test/many-tests.spec.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: test/many-tests.spec.ts.
The file must be included in at least one of the projects provided

This is because if you run eslint --print-config test/many-tests.spec.ts you'll see the parserOptions' project looks like this:

  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module",
    "ecmaFeatures": {
      "generators": false,
      "objectLiteralDuplicateProperties": false
    },
    "project": "./tsconfig.json" <-- this should also include ./test/tsconfig.json
  },

Would it be possible to get support for this situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant