From f88b1824bc67b2f4096ac73fa7ad3acaa9666d0e Mon Sep 17 00:00:00 2001 From: Aaron Moat <2937187+AaronMoat@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:10:34 +1100 Subject: [PATCH] eslint-plugin-react-hooks 5 (#155) --- .changeset/eight-kiwis-dream.md | 7 +++++++ index.js | 3 +-- package.json | 3 +-- pnpm-lock.yaml | 21 ++++++--------------- 4 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 .changeset/eight-kiwis-dream.md diff --git a/.changeset/eight-kiwis-dream.md b/.changeset/eight-kiwis-dream.md new file mode 100644 index 0000000..9f6181f --- /dev/null +++ b/.changeset/eight-kiwis-dream.md @@ -0,0 +1,7 @@ +--- +'eslint-config-seek': minor +--- + +Upgrade `eslint-plugin-react-hooks` to version 5, removing the need for `@eslint/compat`. + +`eslint-plugin-react-hooks` contains some minor rule changes. [Refer to the release notes](https://github.com/facebook/react/releases/tag/eslint-plugin-react-hooks%405.0.0) for more information. diff --git a/index.js b/index.js index 339b436..3aeeb2e 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,6 @@ const react = require('eslint-plugin-react'); const reactHooks = require('eslint-plugin-react-hooks'); const base = require('./base'); -const { fixupPluginRules } = require('@eslint/compat'); const globals = require('globals'); @@ -30,7 +29,7 @@ module.exports = [ { plugins: { react, - 'react-hooks': fixupPluginRules(reactHooks), + 'react-hooks': reactHooks, }, languageOptions: { diff --git a/package.json b/package.json index 5e6c177..d60dc22 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ }, "homepage": "https://github.com/seek-oss/eslint-config-seek#readme", "dependencies": { - "@eslint/compat": "^1.1.1", "typescript-eslint": "^8.6.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", @@ -32,7 +31,7 @@ "eslint-plugin-import-x": "^4.2.1", "eslint-plugin-jest": "^28.8.0", "eslint-plugin-react": "^7.35.0", - "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-hooks": "^5.0.0", "globals": "^15.9.0" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39c4adb..475b4fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: dependencies: - '@eslint/compat': - specifier: ^1.1.1 - version: 1.1.1 eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.8.0) @@ -30,8 +27,8 @@ importers: specifier: ^7.35.0 version: 7.35.0(eslint@9.8.0) eslint-plugin-react-hooks: - specifier: ^4.6.2 - version: 4.6.2(eslint@9.8.0) + specifier: ^5.0.0 + version: 5.0.0(eslint@9.8.0) globals: specifier: ^15.9.0 version: 15.9.0 @@ -133,10 +130,6 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.1.1': - resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-array@0.17.1': resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -616,11 +609,11 @@ packages: jest: optional: true - eslint-plugin-react-hooks@4.6.2: - resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} + eslint-plugin-react-hooks@5.0.0: + resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} engines: {node: '>=10'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 eslint-plugin-react@7.35.0: resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} @@ -1720,8 +1713,6 @@ snapshots: '@eslint-community/regexpp@4.11.0': {} - '@eslint/compat@1.1.1': {} - '@eslint/config-array@0.17.1': dependencies: '@eslint/object-schema': 2.1.4 @@ -2380,7 +2371,7 @@ snapshots: - supports-color - typescript - eslint-plugin-react-hooks@4.6.2(eslint@9.8.0): + eslint-plugin-react-hooks@5.0.0(eslint@9.8.0): dependencies: eslint: 9.8.0