[codemod] The jss-to-tss codemod does not match import makeStyles from '@mui/styles/makeStyles'
#32935
Closed
2 tasks done
Labels
package: codemod
Specific to @mui/codemod
Duplicates
Latest version
Current behavior 😯
If your existing codebase uses the following import, it will be skipped by the jss-to-tss codemod:
import makeStyles from '@mui/styles/makeStyles'
I believe the failure is at jss-to-tss-react.js:186, where the existing checks do not include the fully-qualified include subfile.
This was true for all files in my codebase, so when I ran the codemod, it did not modify any files, which was very confusing.
Expected behavior 🤔
The codemod should catch this case, or at least warn in the documentation so that folks can do a global search-and-replace.
Steps to reproduce 🕹
Steps:
import makeStyles from '@mui/styles/makeStyles'
and makeStylesContext 🔦
Migration from v4 to v5 with tss-react
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: