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

Enable eslint and type checking for Distribution feature #1529

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

jamescrowley
Copy link
Contributor

  • Enabled eslint and type checking for Distribution feature
  • Removed some disabled eslint rules that were not necessary

Comment on lines -59 to -62
custom: {
regex: "^I[A-Z]",
match: true,
},
Copy link
Contributor Author

@jamescrowley jamescrowley Sep 13, 2024

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?

Copy link
Contributor

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 }) {
Copy link
Contributor

@fhenrich33 fhenrich33 Sep 13, 2024

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?

Copy link
Contributor Author

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.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.87%. Comparing base (9b1f140) to head (7d64e6c).
Report is 88 commits behind head on master.

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              
Flag Coverage Δ
backend 99.07% <ø> (ø)
frontend 82.70% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamescrowley
Copy link
Contributor Author

@jamescrowley jamescrowley merged commit 8184626 into master Oct 9, 2024
11 checks passed
@jamescrowley jamescrowley deleted the distribution-linting branch October 9, 2024 01:00
@jamescrowley
Copy link
Contributor Author

Merging this, as I need to make conflicting changes to update Storybook dependency which will resolve webpack security issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants