Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add a script that validates that we don't use prohibited mui m…
…aterial-icons import (#6516) This PR adds a check that should fail the build if we use disallowed imports from `@mui/icons-material`
- Loading branch information
1 parent
2a57acc
commit 9c29461
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if grep -R --include="*.js" --include="*.jsx" --include="*.ts" --include="*.tsx" "from '@mui/icons-material'" src; then | ||
echo "Prohibited import from '@mui/icons-material' found. Use default imports referencing the file instead of the | ||
global package. Example: import Delete from '@mui/icons-material/Delete';'" | ||
exit 1 | ||
else | ||
echo "No prohibited imports from '@mui/icons-material' found." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters