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

[ESLint] Add more hints to lint messages #15046

Merged
merged 6 commits into from
Mar 7, 2019

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Mar 7, 2019

  • Adds a stronger hint to destructure props when it's easy to do
  • Adds a line number to message that asks you to move the function
  • Adds a hint that shows up if you under-specify a function prop
  • Fixes a stale assignment hint to not miss deps that are both written and read
  • Suggest updater form or reducer form when appropriate

@sizebot
Copy link

sizebot commented Mar 7, 2019

Details of bundled changes.

Comparing: 6d2666b...80169c9

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js +10.0% +8.4% 65.79 KB 72.36 KB 15.22 KB 16.5 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js 🔺+12.4% 🔺+10.7% 16.91 KB 19 KB 5.84 KB 6.47 KB NODE_PROD
ESLintPluginReactHooks-dev.js +10.1% +8.6% 70.31 KB 77.39 KB 15.62 KB 16.96 KB FB_WWW_DEV

Generated by 🚫 dangerJS

@gaearon gaearon merged commit 197703e into facebook:master Mar 7, 2019
@gaearon gaearon deleted the lint-good-tweakzes branch March 7, 2019 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants