Skip to content

Commit

Permalink
Merge pull request #13 from pandell/eslint-upgrade
Browse files Browse the repository at this point in the history
@pandell/eslint-config: Support TypeScript 5.6 + NPM update 2024-10-21
  • Loading branch information
milang authored Oct 22, 2024
2 parents 406478c + ecec6ee commit cb81c4b
Show file tree
Hide file tree
Showing 6 changed files with 519 additions and 504 deletions.
725 changes: 367 additions & 358 deletions .yarn/releases/yarn-4.5.0.cjs → .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nodeLinker: node-modules

npmAuthToken: "${PANDELL_NPM_TOKEN}"

yarnPath: .yarn/releases/yarn-4.5.0.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs

# Fix transitive peer dependencies warning in yarn 4.3.0+
# For more info see "PR#6205: Rework peer requirement and warning system",
Expand All @@ -25,4 +25,5 @@ packageExtensions:
"@typescript-eslint/type-utils@*": { peerDependencies: { "eslint": ">= 9" } }
"@typescript-eslint/utils@*": { peerDependencies: { "typescript": ">= 5" } }
"eslint-plugin-import-x@*": { peerDependencies: { "typescript": ">= 5" } }
"eslint-plugin-testing-library@*": { peerDependencies: { "typescript": ">= 5" } }
"typescript-eslint@*": { peerDependencies: { "eslint": ">= 9" } }
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
"verify": "echo '[format]' && run format && echo '[build]' && run build && echo '[lint]' && run lint",
"versions": "echo '[node]' && node --version && echo '\n[yarn]' && yarn --version && echo '\n[prettier]' && prettier --version && echo '\n[eslint]' && eslint --version && echo '\n[tsc]' && tsc --version && echo '\n[browserslist]' && browserslist --version"
},
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"resolutions": {
"@typescript-eslint/utils": "^8.11.0"
},
"devDependencies": {
"@pandell/eslint-config": "workspace:packages/eslint-config",
"browserslist": "^4.24.0",
"eslint": "^9.12.0",
"browserslist": "^4.24.2",
"eslint": "^9.13.0",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
},
Expand Down
22 changes: 9 additions & 13 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,24 @@ Add the following to your `package.json`:

```jsonc
{
"resolutions": {
"@typescript-eslint/utils": "^8.11.0" // see note 1
},
"devDependencies": {
"@pandell/eslint-config": "^9.4.0",
"eslint": "^9.12.0",
"eslint-plugin-testing-library": "^6.3.0", // only needed when using "testing: { enabledTestingLibrary: true }", see note 1 below
"@pandell/eslint-config": "^9.5.0",
"eslint": "^9.13.0",
// ...
},
"resolutions": {
"@typescript-eslint/utils": "^8.8.1" // only needed when including "eslint-plugin-testing-library"
},
// ...
}
```

---

> **Note 1** (`eslint-plugin-testing-library`) While all other plugins can co-exist with ESLint 9 and
are included as direct dependencies of `@pandell/eslint-config`, `eslint-plugin-testing-library` only
supports ESLint 8 as of October 2024. We chose to reference it as an optional peer dependency, not regular
dependency, thus it has to be added to your project's `package.json`. If you do not set
`enabledTestingLibrary` property (or set it to `false`), you do not need to include this dependency.
This recommendation will be removed in the future after `eslint-plugin-testing-library`
adds support for ESLint 9.
> **Note 1** `eslint-plugin-testing-library` depends on a very old version of `typescript-eslint`
library for no good reason. We recommend resolving it to the latest version, to be
consistent with `@pandell/eslint-config`. We should be able to remove the resolution
once testing library plugin upgrades to the latest major version of `typescript-eslint`.

---

Expand Down
21 changes: 9 additions & 12 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pandell/eslint-config",
"type": "module",
"version": "9.4.0",
"version": "9.5.0",
"description": "Pandell ESLint shared config",
"keywords": [
"eslint",
Expand All @@ -26,33 +26,30 @@
},
"dependencies": {
"@eslint-react/eslint-plugin": "^1.15.0",
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.12.0",
"@eslint/compat": "^1.2.1",
"@eslint/js": "^9.13.0",
"@tanstack/eslint-plugin-query": "^5.59.7",
"@typescript-eslint/utils": "^8.9.0",
"@typescript-eslint/utils": "^8.11.0",
"@vitest/eslint-plugin": "^1.1.7",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.3.1",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jsdoc": "^50.4.1",
"eslint-plugin-jsdoc": "^50.4.3",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "^0.4.12",
"eslint-plugin-react-refresh": "^0.4.13",
"eslint-plugin-simple-import-sort": "^12.1.1",
"typescript-eslint": "^8.9.0"
"eslint-plugin-testing-library": "^6.4.0",
"typescript-eslint": "^8.11.0"
},
"devDependencies": {
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": ">= 9",
"eslint-plugin-testing-library": ">= 6.3.0",
"typescript": ">= 5"
},
"peerDependenciesMeta": {
"eslint-plugin-testing-library": {
"optional": true
},
"typescript": {
"optional": true
}
Expand Down
Loading

0 comments on commit cb81c4b

Please sign in to comment.