-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support React Hooks #5602
Comments
Yeah, we should probably cut 3.x alpha with this. |
I'd love to contribute here, if I could. Should I just go ahead and make a PR? |
Sure. There are two action items here:
|
@eivind88 Any progress on this? I got it working locally with minor changes in packages
for eslint-plugin-react-hooks. This is my first foray into create-react-app so please excuse me if I've missed something obvious, including any handling required for ejected projects. I could always push up a branch if you want to see a diff. |
@chriswilty I'm about at the same place that you describe, but I haven't found the time to finsh it up this last week; I've also got the changes working locally.
means that it should be optional, via an arg or somesuch. I think I should be able to push some changes within a weeks time. |
Just pushed my changes; I think I've covered everything, except the "behind an option in the preset, but enabled in CRA by default"-part about the ESLint plugin. I'd love some input on the best way of achieving this! |
👍 This is where I'd ended up also :) |
Is it going to be available in a version prior to We really need this one guys 😍 |
What are we waiting for? |
🙏 I'm getting weird errors in my CRA+TS app like:
... which I'm hoping this new ESLint plugin will help me to debug! |
* Add Babel plug-in for Hooks; Add ESLint plug-in for Hooks (WIP) * Fix transform destructuring loose config * Add eslint-plugin-react-hooks to package.json * Fix package.json's * Fix eslint-plugin-react-hooks version * Fix package.json * Fix package.json * Add eslint-plugin-react-hooks to script package.json * Force array destructuring to work in loose mode only for known Hooks * Update based on feedback from PR * Add 'exhaustive-deps' lint rule * Bump eslint-plugin-react-hooks to stable version * Remove extraneous dependency from react-scripts
Closed via #5997 |
* masterd: (24 commits) Add TypeScript linting support (facebook#6513) Support React Hooks (facebook#5602) (facebook#5997) Support browserslist in @babel/preset-env (facebook#6608) Add empty mock for http2 (facebook#5686) Add note about npx caching (facebook#6374) change named import into default import (facebook#6625) Stage files for commit after ejecting (facebook#5960) Upgrade dependencies (facebook#6614) Make compiler variable const instead of let (facebook#6621) Type check JSON files (facebook#6615) Change class components to functional components in templates (facebook#6451) Convert JSON.stringify \n to os.EOL when writing tsconfig.json (facebook#6610) Update html-webpack-plugin (facebook#6361) Enable click to go to error in console for TypeScript (facebook#6502) Update webpack-dev-server to 3.2.1 (facebook#6483) [docs] revert removal of newlines from html (facebook#6386) Publish Prepare 2.1.8 release Reapply "Speed up TypeScript v2 (facebook#6406)" (facebook#6586) Publish ... # Conflicts: # packages/babel-preset-react-app/create.js # packages/react-scripts/scripts/build.js
https://www.npmjs.com/package/eslint-plugin-react-hooks
This plugin enforce rule of hooks to avoid common misstakes (hook in condition, ...).
Hooks are a new React feature.
The text was updated successfully, but these errors were encountered: