1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/frontend/check-imports.rc
Fredrik Strand Oseberg 9c29461ee5
chore: add a script that validates that we don't use prohibited mui material-icons import (#6516)
This PR adds a check that should fail the build if we use disallowed
imports from `@mui/icons-material`
2024-03-12 13:29:52 +01:00

8 lines
397 B
Plaintext
Executable File

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