0
votes

We have a project that is written in Typescript, under the src folder, but the integration tests (using mocha & chai) in the test folder are written in ES6 Javascript. This is causing an error to be reported in VSCode:

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

It is not a breaking error, but it would be nice to have the tests linted appropriately.

Is there any way to set up eslint so that it applies Typescript rules in the src folder and basic Javascript rules in the test?

BTW We appreciate that should probably update the integration tests to be in Typescript, but we don't currently have that time luxury.

1
Have you looked at overrides? eslint.org/docs/user-guide/configuringjonrsharpe

1 Answers

0
votes

You just need to ignore test/* in your .eslintignore file