Skip to content

feat(eslint-config): move eslint and typescript-eslint to peer deps#174

Merged
JuroUhlar merged 4 commits into
mainfrom
feat/eslint-config-peer-deps
Jul 13, 2026
Merged

feat(eslint-config): move eslint and typescript-eslint to peer deps#174
JuroUhlar merged 4 commits into
mainfrom
feat/eslint-config-peer-deps

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
  • Move eslint and typescript-eslint from dependencies to peerDependencies in eslint-config-dx-team.
  • Drop the redundant @typescript-eslint/eslint-plugin and @typescript-eslint/parser direct deps — they're provided by the typescript-eslint umbrella and never required directly by the config.
  • Keep eslint-config-prettier, eslint-plugin-prettier, and globals bundled (only imported inside the config, so they resolve fine under strict layouts).
  • Add typescript-eslint to the root workspace devDeps to dogfood the new peer, update the README, add a major changeset.

Why: under pnpm v10+ transitive deps are no longer hoisted to the project root, so bundling eslint/typescript-eslint broke the eslint bin and import ... from 'typescript-eslint' in consumer configs (see the node-sdk pnpm upgrade thread). Peers guarantee a single, project-controlled instance of each and avoid "multiple ESLint instances" errors.

Discussion point: this is the "peer deps with range" outcome, not "bundle everything"

This reverses the previous README guidance — consumers now install eslint + typescript-eslint themselves. We lose the "don't repeat in client repos" property for those two packages, but they're the two the consumer actually imports directly, so declaring them is the correct/portable model. Everything else stays bundled. prettier was already a peer. Alternative considered: publicHoistPattern in each repo (pnpm-specific escape hatch that keeps the phantom dependency).

Peer version ranges

Pinned to the current latest major for each, caret-style: eslint: "^10.0.0", typescript-eslint: "^8.0.0", prettier: "^3.0.0". Note this drops eslint 9 support (the config uses eslint/config flat-config APIs and the toolkit already ships eslint 10) — consumers on eslint 9 would see a peer warning and should bump.

Breaking change

Major bump (2.0.0 → 3.0.0 via changeset). Consuming repos must add eslint and typescript-eslint to their devDeps when upgrading; the first will be node-sdk#259.

Note: unrelated lint error on main

pnpm lint reports one pre-existing prettier/prettier error in .github/actions/update-sdk-schema/update-schema.test.ts (trailing whitespace, present on main, untouched by this PR). Left as-is to keep the diff focused.

Under strict package managers (pnpm v10+), transitive dependencies are no
longer exposed at the project root, which broke eslint bin resolution and
'import ... from typescript-eslint' in consuming projects. Declaring them
as peers guarantees a single, project-controlled instance of each.

Also drops the redundant @typescript-eslint/eslint-plugin and
@typescript-eslint/parser direct deps (provided by the typescript-eslint
umbrella). eslint-config-prettier, eslint-plugin-prettier and globals stay
bundled.

BREAKING CHANGE: consumers must now install eslint and typescript-eslint.
@JuroUhlar
JuroUhlar requested a review from a team as a code owner July 7, 2026 10:05
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bbd54e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@fingerprintjs/eslint-config-dx-team Major

Not sure what this means? Click here to learn what changesets are.

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

eslint ^10.0.0, typescript-eslint ^8.0.0, prettier ^3.0.0 — one caret on
the current latest major for each, consistently.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates @fingerprintjs/eslint-config-dx-team to rely on project-provided ESLint/TypeScript-ESLint (via peer dependencies) to avoid pnpm v10+ strict-layout resolution issues, and documents the new installation expectations.

Changes:

  • Move eslint and typescript-eslint from dependencies to peerDependencies for @fingerprintjs/eslint-config-dx-team and remove redundant direct @typescript-eslint/* deps.
  • Add typescript-eslint to the root workspace devDependencies and update lockfile accordingly.
  • Update eslint-config-dx-team README and add a major changeset describing the breaking change.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates workspace lock entries for the new dependency/peer-dependency layout.
packages/eslint-config-dx-team/README.md Updates consumer-facing install/requirements guidance for the new peer dependency model.
packages/eslint-config-dx-team/package.json Moves ESLint + TypeScript-ESLint to peers; keeps only internally-imported tooling bundled.
package.json Adds typescript-eslint to root devDependencies to dogfood the new peer requirement.
.changeset/eslint-config-peer-deps.md Adds a major changeset documenting the breaking change for consumers.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread packages/eslint-config-dx-team/README.md
Comment thread .changeset/eslint-config-peer-deps.md Outdated
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

@fingerprintjs/eslint-config-dx-team@3.0.0

Major Changes

  • Move eslint and typescript-eslint to peer dependencies

    Under strict package managers (pnpm v10+), transitive dependencies are no longer exposed at the project root, which broke eslint bin resolution and import ... from 'typescript-eslint' in consuming projects. Declaring them as peers guarantees a single, project-controlled instance of each and avoids "multiple ESLint instances" errors.

    Breaking change: consumers must now install eslint and typescript-eslint themselves (plus typescript, which typescript-eslint requires as a peer):

    pnpm install -D eslint typescript-eslint typescript

    The redundant @typescript-eslint/eslint-plugin and @typescript-eslint/parser direct dependencies were also removed (they are provided by the typescript-eslint umbrella package). eslint-config-prettier, eslint-plugin-prettier, and globals remain bundled. (3832930)

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This PR will create a major release 🚀

⚠️ This is a test run of the release-notes-comment action that can be found in .github/workflows/analyze-commits.yml

2.0.0 (2026-07-07)

⚠ BREAKING CHANGES

  • eslint-config: consumers must now install eslint and typescript-eslint.

Features

  • eslint-config: move eslint and typescript-eslint to peer deps (3832930)

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 50% 3/6
🟢 Branches 100% 0/0
🔴 Functions 50% 1/2
🔴 Lines 25% 1/4

Test suite run success

15 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from bbd54e6

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟡 All files 50 100 50 25
🟢  greeting.ts 100 100 100 100
🔴  index.ts 0 100 0 0 1-4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/eslint-config-dx-team/README.md
Comment thread .github/actions/update-sdk-schema/update-schema.test.ts
@JuroUhlar
JuroUhlar merged commit ed2145b into main Jul 13, 2026
15 checks passed
@JuroUhlar
JuroUhlar deleted the feat/eslint-config-peer-deps branch July 13, 2026 09:18
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.

4 participants