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

[test] Lint useThemeVariants with custom rules plugin #21963

Merged
merged 6 commits into from
Jul 28, 2020

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jul 27, 2020

Resolves #21648 (comment)

Changed quite a bit from the original implementation.

Test explain best what valid and invalid patterns are caught: https://github.com/eps1lon/material-ui/blob/test/lint-usethemevariants/packages/eslint-plugin-material-ui/src/rules/rules-of-use-theme-variants.test.js

Change to existing code is meant as a sanity check for the rule. CI should fail since we no longer pass the resolved value of disabled in Button to useThemeVariants.

Edit: Fails as expected: https://app.circleci.com/pipelines/github/mui-org/material-ui/16138/workflows/d1b315c8-315b-460c-bd10-7c40dcb27f26/jobs/166269/parallel-runs/0/steps/0-113

@eps1lon eps1lon added the test label Jul 27, 2020
@eps1lon eps1lon requested a review from mnajdova July 27, 2020 21:31
@mui-pr-bot
Copy link

mui-pr-bot commented Jul 27, 2020

Details of bundle changes

Generated by 🚫 dangerJS against ea7610e

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Awesome work, the tests really well describe all scenarios! 👌

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

Successfully merging this pull request may close these issues.

3 participants