+
Skip to content

Conversation

ksnyder9801
Copy link
Contributor

Summary

this is needed for parity with eslint-plugin-react-hooks. specifically when using hook APIs like trpc or simply React.useEffect instead of useEffect, the current lint rule will fail to catch rules-of-hooks violations.

Test Plan

updated test case

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Jun 9, 2024
Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

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

Thanks!

@arendjr arendjr changed the title fix(use-hook-at-top-level): recognize hook property in member expression calls fix(useHookAtTopLevel): recognize hook property in member expression calls Jun 10, 2024
Copy link

codspeed-hq bot commented Jun 10, 2024

CodSpeed Performance Report

Merging #3140 will not alter performance

Comparing ksnyder9801:rules-of-hooks (d0db974) with main (535acc7)

Summary

✅ 92 untouched benchmarks

@Sec-ant Sec-ant merged commit 5d76e45 into biomejs:main Jun 10, 2024
@ipanasenko
Copy link
Contributor

Started to get false-positives:

beforeEach(() => jest.useFakeTimers('legacy'));
afterEach(() => jest.useRealTimers());

@ematipico
Copy link
Member

Can you open a new issue?

@ipanasenko
Copy link
Contributor

Yes, sure: #3337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载