-
Notifications
You must be signed in to change notification settings - Fork 2k
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
meta: ignore require-default-props
lint rule for function components
#5253
Conversation
Diff output filesNo diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the explicit = undefined
seem silly as that's already the default?
I don't know about silliness, comments also do not change runtime behavior, but you wouldn't argue they're silly, would you? It communicates to the reader that this is an optional prop (and the default value is |
But we have TS exactly for that, to indicate what is optional and what isn't? I'm not sure we want to make a habit to type every single optional property in arguments to |
require-default-props
lint rulerequire-default-props
lint rule for function components
| Package | Version | Package | Version | | -------------------- | ------------- | -------------------- | ------------- | | @uppy/aws-s3 | 4.0.0-beta.7 | @uppy/locales | 4.0.0-beta.4 | | @uppy/box | 3.0.0-beta.7 | @uppy/onedrive | 4.0.0-beta.7 | | @uppy/companion | 5.0.0-beta.10 | @uppy/provider-views | 4.0.0-beta.9 | | @uppy/core | 4.0.0-beta.10 | @uppy/react | 4.0.0-beta.7 | | @uppy/dashboard | 4.0.0-beta.10 | @uppy/remote-sources | 2.0.0-beta.5 | | @uppy/dropbox | 4.0.0-beta.8 | @uppy/transloadit | 4.0.0-beta.9 | | @uppy/google-drive | 3.6.0-beta.1 | uppy | 4.0.0-beta.12 | | @uppy/google-photos | 0.2.0-beta.1 | | | - meta: ignore `require-default-props` lint rule for function components (Antoine du Hamel / #5253) - @uppy/provider-views: Renames & `eslint-disable react/require-default-props` removal (Evgenia Karunus / #5251) - @uppy/companion: coalesce options `bucket` and `getKey` (Mikael Finstad / #5169) - @uppy/aws-s3: add `endpoint` option (Antoine du Hamel / #5173) - @uppy/locales: fix `fa_IR` export (Merlijn Vos / #5241) - @uppy/companion: improve companion logging (Mikael Finstad / #5250) - @uppy/transloadit: also fix outdated assembly transloadit:result (Merlijn Vos / #5246) - docs: fix typo in the url (Evgenia Karunus) - examples,@uppy/locales,@uppy/provider-views,@uppy/transloadit: Release: [email protected] (github-actions[bot] / #5242) - meta: Improve aws-node example readme (Artur Paikin / #4753) - @uppy/locales: Added translation string (it_IT) (Samuel / #5237) - @uppy/transloadit: fix transloadit:result event (Merlijn Vos / #5231) - @uppy/provider-views: fix wrong font for files (Merlijn Vos / #5234)
Follow up of: #5222
In the end, we'd rather trust TS alone to tell us when we forgot to set a default value for a prop that shouldn't be undefined.