-
Notifications
You must be signed in to change notification settings - Fork 11
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
Enable eslint and type checking for Distribution feature #1529
Conversation
jamescrowley
commented
Sep 13, 2024
- Enabled eslint and type checking for Distribution feature
- Removed some disabled eslint rules that were not necessary
custom: { | ||
regex: "^I[A-Z]", | ||
match: true, | ||
}, |
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.
Distribution doesn't obey this rule, but rather than fixing all of those - just figured it would be ok to relax this one for now?
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 intend to suggest defaulting to type
instead of interface
whenever possible so that's a nudge in that direction.
@@ -107,7 +107,7 @@ function HeaderMenuDesktopContent({ ...props }: IHeaderMenuProps) { | |||
); | |||
} | |||
|
|||
function HeaderMenuDesktopContainer({ children }) { | |||
function HeaderMenuDesktopContainer({ children }: { children: React.ReactNode }) { |
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 think children
should be inferred correctly from all but most obscure Component types (or those self closing HTML tags). Is that not the case somehow?
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's because they are React component props, that the linter requires explicit types even if they can be inferred, I believe.
a7e1d98
to
7d64e6c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1529 +/- ##
==========================================
+ Coverage 85.85% 85.87% +0.01%
==========================================
Files 229 229
Lines 21709 21749 +40
Branches 1927 1928 +1
==========================================
+ Hits 18639 18677 +38
- Misses 3034 3036 +2
Partials 36 36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merging this, as I need to make conflicting changes to update Storybook dependency which will resolve webpack security issues |