Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/eslint-config-peer-deps.md
Original file line number Diff line number Diff line change
@@ -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 (plus `typescript`, which `typescript-eslint` requires as a peer):

```bash
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.
2 changes: 1 addition & 1 deletion .github/actions/update-sdk-schema/update-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const orgFetch = globalThis.fetch

describe('Update schema', () => {
let pkg: ReturnType<typeof createTestPkg>

Comment thread
JuroUhlar marked this conversation as resolved.
beforeEach(() => {
jest.clearAllMocks()

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
"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",
"typescript-eslint": "^8.60.0",
"unzipper": "^0.12.3"
},
"dependencies": {
Expand Down
20 changes: 13 additions & 7 deletions packages/eslint-config-dx-team/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ This package provides a custom preset for [eslint](https://github.com/eslint/esl

## Requirements

- Prettier v3+
- ESLint v10
- `typescript-eslint` v8
- TypeScript v5 (peer dependency of `typescript-eslint`)
- Prettier v3

## Installation

To install this package, use the following command:
`eslint`, `typescript-eslint`, `typescript`, and `prettier` are peer dependencies, so install them alongside the config:
Comment thread
JuroUhlar marked this conversation as resolved.

```bash
pnpm install -D @fingerprintjs/eslint-config-dx-team prettier
pnpm install -D @fingerprintjs/eslint-config-dx-team eslint typescript-eslint typescript prettier
```
Comment thread
JuroUhlar marked this conversation as resolved.

## Configuration
Expand Down Expand Up @@ -78,15 +81,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` (which in turn requires `typescript`)

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

Expand Down
10 changes: 4 additions & 6 deletions packages/eslint-config-dx-team/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@
"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": {
"prettier": ">=3"
"eslint": "^10.0.0",
"typescript-eslint": "^8.0.0",
"prettier": "^3.0.0"
},
"engines": {
"node": "^20.19.0 || ^22.13.0 || >=24"
Expand Down
19 changes: 8 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading