Skip to content

[Bug]: projectService failed to find referenced tsconfigs for typical monorepo setup #1234

Description

@swwind

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

  1. Clone the repro repository: https://github.com/swwind/rslint-reference-repro
  2. 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).
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions