Skip to content
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

fix(linter): disable react/rules-of-hooks for vue and svelte files #8165

Conversation

Sysix
Copy link
Contributor

@Sysix Sysix commented Dec 28, 2024

because of #8003

I used the FrameworkFlags in hope they are only active in .vue and .svelte files.
Not Tested!

Copy link

graphite-app bot commented Dec 28, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Dec 28, 2024
Copy link

codspeed-hq bot commented Dec 28, 2024

CodSpeed Performance Report

Merging #8165 will not alter performance

Comparing Sysix:fix-linter-disables-rules-of-hooks-inm-vue-and-svelte (47870eb) with main (1b9a5ba)

Summary

✅ 29 untouched benchmarks

@camc314 camc314 merged commit 1171e00 into oxc-project:main Dec 28, 2024
26 checks passed
@camc314
Copy link
Contributor

camc314 commented Dec 28, 2024

with the nested config stuff, i think we'll need to rething framework flags.

(maybe this is an edge case). but if i had a svelte, AND a react project in the codebase, we would want to make sure this only runs on the react code

@Sysix
Copy link
Contributor Author

Sysix commented Dec 28, 2024

this is exactly what I wanted to avoid. I can patch it and check for the file extension instead

@camc314
Copy link
Contributor

camc314 commented Dec 28, 2024

just a heads up, you can't rely on the extension being .tsx as some people have hooks in just ts files

if .vue or .svelte
return false i guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants