Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Mar 11, 2024
1 parent 5b3150f commit 67e475f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function transformer(file, api, options) {
});
});

const selectorRegex = new RegExp(`${replacementSelectorPrefix}${deprecatedClass}($)`);
const selectorRegex = new RegExp(`${replacementSelectorPrefix}${deprecatedClass}$`);
root
.find(
j.Literal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('@mui/codemod', () => {
const actual = jsTransform(
{ source: read('./test-cases/actual.js') },
{ jscodeshift },
{ printOptions: { quote: 'single', trailingComma: true } },
{ printOptions: { quote: 'double', trailingComma: true } },
);

const expected = read('./test-cases/expected.js');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { buttonGroupClasses } from '@mui/material/ButtonGroup';

('&.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-vertical > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-text > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-text.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-text.MuiButtonGroup-vertical > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-text.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-text.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-outlined > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-outlined.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-outlined.MuiButtonGroup-vertical > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-outlined.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-outlined.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-contained > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-contained.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-contained.MuiButtonGroup-vertical > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-contained.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped');
('&.MuiButtonGroup-contained.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped');
("&.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
`&.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`;
`&.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`;
`&.${buttonGroupClasses.text} > .${buttonGroupClasses.grouped}`;
Expand Down

0 comments on commit 67e475f

Please sign in to comment.