Skip to content

Bump eslint-plugin-react-hooks from 4.6.0 to 4.6.2 #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 13, 2024

Bumps eslint-plugin-react-hooks from 4.6.0 to 4.6.2.

Changelog

Sourced from eslint-plugin-react-hooks's changelog.

5.0.0 (next release)

  • New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means _Button or _component are no longer valid. (@​kassens) in #25162
Commits
Maintainer changes

This version was pushed to npm by react-bot, a new releaser for eslint-plugin-react-hooks since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 4.6.0 to 4.6.2.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-hooks
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 13, 2024
@dependabot dependabot bot requested review from a team and ohakutsu and removed request for a team May 13, 2024 05:09
@kimkim0814 kimkim0814 requested review from kimkim0814 and removed request for ohakutsu May 30, 2024 02:41
@kimkim0814
Copy link
Member

kimkim0814 commented May 30, 2024

eslint-plugin-react-hooks とは

This ESLint plugin enforces the Rules of Hooks.
It is a part of the Hooks API for React.

ref:https://www.npmjs.com/package/eslint-plugin-react-hooks

React HooksのAPIの一部であり、React Hooksのルールを強制するための
Eslintプラグインである。

このプラグインは以下の2つの主要なルールを提供している

react-hooks/rules-of-hooks

Hooksを呼び出す際のルールを強制する。
具体的には、Hooksはトップレベルでのみ呼び出すことができネストされた関数内で呼び出すことはできない。

ref:https://ja.legacy.reactjs.org/docs/hooks-rules.html

react-hooks/exhaustive-deps

effect Hook(useEffect, useLayoutEffect, useMemo, useCallbackなど)の依存配列に、effect内で使用される全ての値が含まれていることを強制する。

ref:https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md#advanced-configuration

@kimkim0814
Copy link
Member

📝

New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means _Button or _component are no longer valid

5.0.0へのメジャーアップデート時に 小文字以外はOKではなく大文字のみの変更となったので
今回は関係ないが念のため _で始まるコンポーネントはないかgrepで確認した。

ログを確認する限り、_で始まるコンポーネントは存在しなかった。

qiita-cli % git ls-files '*.ts' '*.tsx' | xargs grep -E '\b_[A-Za-z0-9]*\b'
src/client/components/ArticleInfo.tsx:              <a href={qiitaItemUrl} target="_blank" rel="noopener noreferrer">
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:          target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:          target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:                target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/client/components/SidebarContents.tsx:              target="_blank"
src/commands/newArticles.ts:  if (args._.length > 0) {
src/commands/newArticles.ts:    for (const basename of args._) {
src/commands/publish.ts:    for (const basename of args._) {
src/lib/validators/item-validator.test.ts:        tags: [...Array(6)].map((_, i) => `tag${i}`),
src/main.ts:const commandName = args._[0] || "preview";
src/main.ts:const commandArgs = args._.slice(1);

Copy link
Member

@kimkim0814 kimkim0814 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

プレビュー画面を確認したが、動作に問題はなかった。

LGTM!

@kimkim0814 kimkim0814 merged commit 9f63085 into main May 30, 2024
6 checks passed
@kimkim0814 kimkim0814 deleted the dependabot/npm_and_yarn/eslint-plugin-react-hooks-4.6.2 branch May 30, 2024 04:06
@wataru86 wataru86 mentioned this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant