From 38329309267ff0e53e35583410aaaf311cc4ad59 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 7 Jul 2026 11:04:33 +0100 Subject: [PATCH 1/4] feat(eslint-config): move eslint and typescript-eslint to peer deps 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. --- .changeset/eslint-config-peer-deps.md | 15 +++++++++++++++ package.json | 1 + packages/eslint-config-dx-team/README.md | 17 +++++++++++------ packages/eslint-config-dx-team/package.json | 8 +++----- pnpm-lock.yaml | 13 +++++-------- 5 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 .changeset/eslint-config-peer-deps.md diff --git a/.changeset/eslint-config-peer-deps.md b/.changeset/eslint-config-peer-deps.md new file mode 100644 index 0000000..ee466bd --- /dev/null +++ b/.changeset/eslint-config-peer-deps.md @@ -0,0 +1,15 @@ +--- +'@fingerprintjs/eslint-config-dx-team': major +--- + +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: + +```bash +pnpm install -D eslint typescript-eslint +``` + +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. diff --git a/package.json b/package.json index 390e496..822e3d2 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "ts-jest": "^29.1.2", "tsup": "^8.2.4", "typescript": "^5.4.2", + "typescript-eslint": "^8.60.0", "unzipper": "^0.12.3" }, "dependencies": { diff --git a/packages/eslint-config-dx-team/README.md b/packages/eslint-config-dx-team/README.md index d7af465..c370824 100644 --- a/packages/eslint-config-dx-team/README.md +++ b/packages/eslint-config-dx-team/README.md @@ -4,14 +4,16 @@ This package provides a custom preset for [eslint](https://github.com/eslint/esl ## Requirements +- ESLint v9.18+ or v10 +- `typescript-eslint` v8 - Prettier v3+ ## Installation -To install this package, use the following command: +`eslint`, `typescript-eslint`, and `prettier` are peer dependencies, so install them alongside the config: ```bash -pnpm install -D @fingerprintjs/eslint-config-dx-team prettier +pnpm install -D @fingerprintjs/eslint-config-dx-team eslint typescript-eslint prettier ``` ## Configuration @@ -78,15 +80,18 @@ export default [ ## Dependencies -To simplify dependencies update in project this package has eslint and eslint packages as a dependencies. Please don't add any of them as a dependencies for you project: +`eslint` and `typescript-eslint` are declared as **peer dependencies**. Your project imports both directly (ESLint provides the CLI/bin you run, and your `eslint.config` typically imports `typescript-eslint`), and both need to resolve to a single instance to avoid "multiple ESLint instances" errors — so you must install them in your project: -- `@typescript-eslint/eslint-plugin` -- `@typescript-eslint/parser` - `eslint` +- `typescript-eslint` + +Everything else is bundled by this package — **don't** add these to your project: + - `eslint-config-prettier` - `eslint-plugin-prettier` - `globals` -- `typescript-eslint` + +> **Note:** Under strict package managers such as pnpm v10+, transitive dependencies are no longer hoisted to the project root, which is why `eslint` and `typescript-eslint` must be declared as peers rather than bundled. ## License diff --git a/packages/eslint-config-dx-team/package.json b/packages/eslint-config-dx-team/package.json index 83c3242..0fe23ba 100644 --- a/packages/eslint-config-dx-team/package.json +++ b/packages/eslint-config-dx-team/package.json @@ -23,15 +23,13 @@ "type-checked.js" ], "dependencies": { - "@typescript-eslint/eslint-plugin": "^8.60.0", - "@typescript-eslint/parser": "^8.60.0", - "eslint": "10.4.1", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", - "globals": "^15.0.0", - "typescript-eslint": "^8.60.0" + "globals": "^15.0.0" }, "peerDependencies": { + "eslint": "^9.18.0 || ^10.0.0", + "typescript-eslint": "^8.0.0", "prettier": ">=3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9bb507..eabac9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,6 +99,9 @@ importers: typescript: specifier: ^5.4.2 version: 5.4.2 + typescript-eslint: + specifier: ^8.60.0 + version: 8.61.0(eslint@10.4.1)(typescript@5.4.2) unzipper: specifier: ^0.12.3 version: 0.12.3 @@ -123,14 +126,8 @@ importers: packages/eslint-config-dx-team: dependencies: - '@typescript-eslint/eslint-plugin': - specifier: ^8.60.0 - version: 8.61.0(@typescript-eslint/parser@8.61.0(eslint@10.4.1)(typescript@5.4.2))(eslint@10.4.1)(typescript@5.4.2) - '@typescript-eslint/parser': - specifier: ^8.60.0 - version: 8.61.0(eslint@10.4.1)(typescript@5.4.2) eslint: - specifier: 10.4.1 + specifier: ^9.18.0 || ^10.0.0 version: 10.4.1 eslint-config-prettier: specifier: ^9.1.0 @@ -145,7 +142,7 @@ importers: specifier: '>=3' version: 3.2.4 typescript-eslint: - specifier: ^8.60.0 + specifier: ^8.0.0 version: 8.61.0(eslint@10.4.1)(typescript@5.4.2) packages/prettier-config-dx-team: From 04a041439bc7774b0c704827ba3df970299fd568 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 7 Jul 2026 11:11:37 +0100 Subject: [PATCH 2/4] chore(eslint-config): pin peer ranges to latest major only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eslint ^10.0.0, typescript-eslint ^8.0.0, prettier ^3.0.0 — one caret on the current latest major for each, consistently. --- packages/eslint-config-dx-team/README.md | 4 ++-- packages/eslint-config-dx-team/package.json | 4 ++-- pnpm-lock.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/eslint-config-dx-team/README.md b/packages/eslint-config-dx-team/README.md index c370824..e4586b6 100644 --- a/packages/eslint-config-dx-team/README.md +++ b/packages/eslint-config-dx-team/README.md @@ -4,9 +4,9 @@ This package provides a custom preset for [eslint](https://github.com/eslint/esl ## Requirements -- ESLint v9.18+ or v10 +- ESLint v10 - `typescript-eslint` v8 -- Prettier v3+ +- Prettier v3 ## Installation diff --git a/packages/eslint-config-dx-team/package.json b/packages/eslint-config-dx-team/package.json index 0fe23ba..54f1c1a 100644 --- a/packages/eslint-config-dx-team/package.json +++ b/packages/eslint-config-dx-team/package.json @@ -28,9 +28,9 @@ "globals": "^15.0.0" }, "peerDependencies": { - "eslint": "^9.18.0 || ^10.0.0", + "eslint": "^10.0.0", "typescript-eslint": "^8.0.0", - "prettier": ">=3" + "prettier": "^3.0.0" }, "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eabac9a..2a6f913 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,7 +127,7 @@ importers: packages/eslint-config-dx-team: dependencies: eslint: - specifier: ^9.18.0 || ^10.0.0 + specifier: ^10.0.0 version: 10.4.1 eslint-config-prettier: specifier: ^9.1.0 @@ -139,7 +139,7 @@ importers: specifier: ^15.0.0 version: 15.15.0 prettier: - specifier: '>=3' + specifier: ^3.0.0 version: 3.2.4 typescript-eslint: specifier: ^8.0.0 From d530447c594459ed28a86dc7d7899a4d1b82d010 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 7 Jul 2026 11:34:01 +0100 Subject: [PATCH 3/4] docs(eslint-config): note typescript peer requirement in install steps --- .changeset/eslint-config-peer-deps.md | 4 ++-- packages/eslint-config-dx-team/README.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.changeset/eslint-config-peer-deps.md b/.changeset/eslint-config-peer-deps.md index ee466bd..efef96f 100644 --- a/.changeset/eslint-config-peer-deps.md +++ b/.changeset/eslint-config-peer-deps.md @@ -6,10 +6,10 @@ 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: +**Breaking change:** consumers must now install `eslint` and `typescript-eslint` themselves (plus `typescript`, which `typescript-eslint` requires as a peer): ```bash -pnpm install -D eslint typescript-eslint +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. diff --git a/packages/eslint-config-dx-team/README.md b/packages/eslint-config-dx-team/README.md index e4586b6..8a41d84 100644 --- a/packages/eslint-config-dx-team/README.md +++ b/packages/eslint-config-dx-team/README.md @@ -6,14 +6,15 @@ This package provides a custom preset for [eslint](https://github.com/eslint/esl - ESLint v10 - `typescript-eslint` v8 +- TypeScript v5 (peer dependency of `typescript-eslint`) - Prettier v3 ## Installation -`eslint`, `typescript-eslint`, and `prettier` are peer dependencies, so install them alongside the config: +`eslint`, `typescript-eslint`, `typescript`, and `prettier` are peer dependencies, so install them alongside the config: ```bash -pnpm install -D @fingerprintjs/eslint-config-dx-team eslint typescript-eslint prettier +pnpm install -D @fingerprintjs/eslint-config-dx-team eslint typescript-eslint typescript prettier ``` ## Configuration @@ -83,7 +84,7 @@ export default [ `eslint` and `typescript-eslint` are declared as **peer dependencies**. Your project imports both directly (ESLint provides the CLI/bin you run, and your `eslint.config` typically imports `typescript-eslint`), and both need to resolve to a single instance to avoid "multiple ESLint instances" errors — so you must install them in your project: - `eslint` -- `typescript-eslint` +- `typescript-eslint` (which in turn requires `typescript`) Everything else is bundled by this package — **don't** add these to your project: From bbd54e6343a8cc3e069b6b295a1d2a10254077d9 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 7 Jul 2026 11:37:32 +0100 Subject: [PATCH 4/4] chore: bump root prettier to v3 to match eslint-config peer range --- .github/actions/update-sdk-schema/update-schema.test.ts | 2 +- package.json | 2 +- pnpm-lock.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/update-sdk-schema/update-schema.test.ts b/.github/actions/update-sdk-schema/update-schema.test.ts index a061a12..9c46b80 100644 --- a/.github/actions/update-sdk-schema/update-schema.test.ts +++ b/.github/actions/update-sdk-schema/update-schema.test.ts @@ -28,7 +28,7 @@ const orgFetch = globalThis.fetch describe('Update schema', () => { let pkg: ReturnType - + beforeEach(() => { jest.clearAllMocks() diff --git a/package.json b/package.json index 822e3d2..c05f499 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "human-id": "^4.1.1", "husky": "^8.0.3", "jest": "^29.7.0", - "prettier": "^2.8.8", + "prettier": "^3.2.4", "ts-jest": "^29.1.2", "tsup": "^8.2.4", "typescript": "^5.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a6f913..a63ff26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,8 +88,8 @@ importers: specifier: ^29.7.0 version: 29.7.0(@types/node@20.11.27)(ts-node@10.9.2(@types/node@20.11.27)(typescript@5.4.2)) prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.2.4 + version: 3.2.4 ts-jest: specifier: ^29.1.2 version: 29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.11.27)(ts-node@10.9.2(@types/node@20.11.27)(typescript@5.4.2)))(typescript@5.4.2)