Skip to content

Commit

Permalink
Bump eslint-plugin-react-hooks to v5.0.0
Browse files Browse the repository at this point in the history
There's no default flat config, but this version lets you wire things up
manually without using the compatibility shims. See the issue in the
React GitHub repository whose ID is the product of 23 and 1231, which I
don't want GitHub to auto-link via a full web URL because the issue is
crowded enough as-is.

(Also, because I have a specific history of being an awful person and
linking an angrily written commit message from this very project into a
different Facebook-originated OSS project while working around a bug
that wasn't even that bad. Since this was in Hypcast v1, the relevant
change and my note about rewriting the repo history are no longer
accessible from this repo's current branches. However, my behavior in
this incident is shameful and atrocious enough that a record of its
existence deserves to remain here.)
  • Loading branch information
ahamlinman committed Nov 1, 2024
1 parent 0b71dda commit 35ac76b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
21 changes: 8 additions & 13 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,22 @@ export default tseslint.config(

js.configs.recommended,

// @ts-expect-error
react.configs.flat.recommended,
{ settings: { react: { version: "detect" } } },

{
plugins: { "react-hooks": reactHooks },
rules: reactHooks.configs.recommended.rules,
},

...tseslint.configs.recommended.map((config) => ({
files: ["**/*.ts?(x)"],
...config,
})),

...fixupConfigRules(
compat.extends(
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
),
),
{
plugins: {
// @ts-ignore
"react-hooks": fixupPluginRules(reactHooks),
"jsx-a11y": fixupPluginRules(jsxA11Y),
},
},
{ plugins: { "jsx-a11y": fixupPluginRules(jsxA11Y) } },
...fixupConfigRules(compat.extends("plugin:jsx-a11y/recommended")),

{
rules: {
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"eslint": "^9.9.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^5.0.0",
"events": "^3.3.0",
"prettier": "^3.0.0",
"react": "^18.1.0",
Expand Down
8 changes: 4 additions & 4 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,10 @@ eslint-plugin-jsx-a11y@^6.7.1:
safe-regex-test "^1.0.3"
string.prototype.includes "^2.0.1"

eslint-plugin-react-hooks@^4.6.0:
version "4.6.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596"
integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==
eslint-plugin-react-hooks@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0.tgz#72e2eefbac4b694f5324154619fee44f5f60f101"
integrity sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==

eslint-plugin-react@^7.32.2:
version "7.37.2"
Expand Down

0 comments on commit 35ac76b

Please sign in to comment.