-
Notifications
You must be signed in to change notification settings - Fork 308
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
chore(ui-react): lint primitives (T - Z) #3297
Conversation
🦋 Changeset detectedLatest commit: 423715e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/react/.eslintrc.js
Outdated
// 'X', | ||
// 'Y', | ||
// 'Z' | ||
'T', |
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.
If all primitives are done, can we remove these and go back to src/primitives/**/*
?
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.
There is no going back where we've never been 😄
All jokes aside will update the .eslintrc.js in a follow up
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.
Went ahead and updated the lint config to remove the need templateJoin
// at this point the child defined (not null or undefined) | ||
// it is NOT a TabItem, so log a message | ||
if (child) { | ||
console.warn( |
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.
I know you explained this, but why are we not logging a message anymore?
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.
It was very easy to bypass the isTabsType
predicate, so the warning here was also fragile
* Additionally, `value` is avaialble on the props of `TabItemPrimitive`, but is not present | ||
* on `TabItemProps`. To mitigate this issue prefer usage of the props of `TabItemPrimitive` | ||
`*/ | ||
type ExtendedTabItemProps = Parameters<typeof TabItemPrimitive>[0] & { |
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.
TIL about Parameters
util type!
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.
LGTM
Description of changes
Lint primitives
T*
-Z*
Issue #, if available
NA
Description of how you validated changes
yarn react lint && yarn react test
Checklist
yarn test
passessideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.