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] Allow omitting constant primitive deps #14959

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Feb 26, 2019

There was some feedback that constant primitives like 42 or 'foo' are unnecessary in dependency list. This fixes the rule to not complain about them (but also not mind them being declared).

I had to fix some existing tests to use objects so they'd keep being invalid.

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

neat!

@sizebot
Copy link

sizebot commented Feb 26, 2019

Details of bundled changes.

Comparing: 3989c09...607c235

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js +0.9% +0.9% 48.84 KB 49.28 KB 11.51 KB 11.62 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js 🔺+1.5% 🔺+1.5% 12.13 KB 12.31 KB 4.4 KB 4.47 KB NODE_PROD
ESLintPluginReactHooks-dev.js +0.9% +0.9% 52.34 KB 52.81 KB 11.84 KB 11.95 KB FB_WWW_DEV

Generated by 🚫 dangerJS

@gaearon gaearon merged commit 0b8efb2 into facebook:master Feb 26, 2019
@gaearon gaearon deleted the lint-tweakz branch February 26, 2019 16:12
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.

4 participants