Details
There is a mismatched behavior of the projectService configuration option between rslint and eslint.
In a monorepo setup where the root tsconfig.json only contains references pointing to package-specific config files, rslint (configured with projectService: true) fails to find the corresponding tsconfig.json for the TypeScript file, causing type-aware rules to be silently skipped.
In contrast, eslint (configured with projectService: true) successfully follows the references, locates the correct tsconfig.json for the file, and runs type-aware checks correctly.
For more details on the setup and comparison, see #1225.
Reproduce link
https://github.com/swwind/rslint-reference-repro
Reproduce Steps
- Clone the repro repository:
https://github.com/swwind/rslint-reference-repro
- Run
rslint with the configuration in rslint3.config.ts (which has parserOptions: { projectService: true }):
pnpm exec rslint --config rslint3.config.ts .
Observe that it only reports the no-console error but silently skips the @typescript-eslint/no-floating-promises error on index.ts (reports 1 error instead of 2).
- Run
eslint with the configuration in eslint4.config.ts (which also has parserOptions: { projectService: true }):
pnpm exec eslint -c eslint4.config.ts .
Observe that it successfully reports 2 errors (both no-console and @typescript-eslint/no-floating-promises).
Details
There is a mismatched behavior of the
projectServiceconfiguration option betweenrslintandeslint.In a monorepo setup where the root
tsconfig.jsononly containsreferencespointing to package-specific config files,rslint(configured withprojectService: true) fails to find the correspondingtsconfig.jsonfor the TypeScript file, causing type-aware rules to be silently skipped.In contrast,
eslint(configured withprojectService: true) successfully follows the references, locates the correcttsconfig.jsonfor the file, and runs type-aware checks correctly.For more details on the setup and comparison, see #1225.
Reproduce link
https://github.com/swwind/rslint-reference-repro
Reproduce Steps
https://github.com/swwind/rslint-reference-reprorslintwith the configuration in rslint3.config.ts (which hasparserOptions: { projectService: true }):no-consoleerror but silently skips the@typescript-eslint/no-floating-promiseserror on index.ts (reports 1 error instead of 2).eslintwith the configuration in eslint4.config.ts (which also hasparserOptions: { projectService: true }):no-consoleand@typescript-eslint/no-floating-promises).