Skip to content

fix(eslint-plugin): drop conflicting project parser option#3295

Open
kriskowal wants to merge 1 commit into
masterfrom
fix-eslint-projectservice-conflict
Open

fix(eslint-plugin): drop conflicting project parser option#3295
kriskowal wants to merge 1 commit into
masterfrom
fix-eslint-projectservice-conflict

Conversation

@kriskowal

@kriskowal kriskowal commented Jun 3, 2026

Copy link
Copy Markdown
Member

Problem

The shared @endo/internal ESLint config (packages/eslint-plugin/lib/configs/internal.js) set both projectService and the redundant useProjectService: true flag in parserOptions. With the installed typescript-eslint (8.59), enabling the legacy project mechanism alongside projectService is rejected — the parser throws Parsing error: Enabling "project" does nothing when "projectService" is enabled at 0:0 for every file, so lint was effectively broken monorepo-wide.

Fix

Drop the now-redundant useProjectService: true (and, where still present, the legacy project glob and its rootTsProjectGlob const). The project service is the sole mechanism: it discovers the nearest tsconfig per file and falls back to defaultProject for stray *.js files. A short comment documents that the two mechanisms must not both be set.

Verification

  • npx corepack yarn eslint on a package source file now exits 0 with no Parsing error … projectService lines.
  • Type-aware linting still engages: a temporary probe doing {} + 1 (// @ts-nocheck) correctly reported a @typescript-eslint/restrict-plus-operands error, confirming type information is available to the parser. The probe was removed before committing.

@changeset-bot

changeset-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b3592c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kriskowal kriskowal force-pushed the fix-eslint-projectservice-conflict branch from d16fbc2 to 809ca5d Compare June 3, 2026 05:31
kriskowal pushed a commit to kriskowal/garden that referenced this pull request Jun 3, 2026
kriskowal pushed a commit to kriskowal/garden that referenced this pull request Jun 3, 2026
The @endo/internal config set both `projectService` and the legacy
`project` glob in parserOptions. typescript-eslint 8.59 now rejects
that combination ("Enabling 'project' does nothing when 'projectService'
is enabled"), so every file failed to parse with a 0:0 error.

Remove the legacy `project: [tsconfig.eslint-full.json]` mechanism (and
its now-unused glob const and redundant `useProjectService` boolean).
The project service supersedes it, discovering the nearest tsconfig per
file and falling back to `defaultProject` for stray `*.js` files.

Verified type-aware linting still engages (restrict-plus-operands fires
on a probe) and packages now lint with 0 errors.
@kriskowal

Copy link
Copy Markdown
Member Author

endojs/endo-but-for-bots#428 demonstrates that lint is not broken on master. Is there a compelling reason to follow-through with this change given that it does not address a problem?

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

Successfully merging this pull request may close these issues.

1 participant