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

Hide APIs #439

Merged
merged 2 commits into from May 27, 2022
Merged

Hide APIs #439

merged 2 commits into from May 27, 2022

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented May 18, 2022

Pulled from #396 So we can deploy it separately

Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

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

code looks good to me!

i noticed you tend to use the ternary operator for rendering things conditionally, while i usually use something like apis.length > 0 && <ContentToRender> - let me know if it's preferable to use the ternary operator in this project

@Janpot
Copy link
Member Author

Janpot commented May 18, 2022

I always prefer ternary as I once was bitten by the same bug as in https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx
if we're going to make one style mandatory we should probably look for a linting solution to enforce it

@apedroferreira
Copy link
Member

I always prefer ternary as I once was bitten by the same bug as in https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx if we're going to make one style mandatory we should probably look for a linting solution to enforce it

maybe this helps? jsx-eslint/eslint-plugin-react#3203
other than that there doesn't seem to be a rule for every case, but i think it's fine not to enforce ternary jsx-eslint/eslint-plugin-react#2073
i can try it and make a PR in a bit

@Janpot
Copy link
Member Author

Janpot commented May 18, 2022

@apedroferreira great find, but the version of eslint-plugin-react containing the rule isn't released yet. We can enable it once it gets released.

@Janpot Janpot merged commit 2e064b4 into mui:master May 27, 2022
@Janpot Janpot deleted the hide-api branch May 27, 2022 07:06
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.

None yet

2 participants