eslint-plugin-material-ui-unused-classes
eslint-plugin-material-ui-unused-classes copied to clipboard
Detect unused Material UI styling classes using eslint
If your styles are created like this, then you're good: ```ts const classes = useStyles() ``` If you use any other variable name, however, the plugin declares every class as...
project made with `create-react-app` using `"react-scripts": "4.0.3"` heres the relevent package.json: ` "eslintConfig": { "extends": [ "react-app", "react-app/jest" ], "plugins": [ "mui-unused-classes" ], "rules": { "mui-unused-classes/unused-classes": 1 } }, "devDependencies":...
Closes https://github.com/jens-ox/eslint-plugin-material-ui-unused-classes/issues/8 This is a PR for the branch mentioned here https://github.com/jens-ox/eslint-plugin-material-ui-unused-classes/issues/8#issuecomment-1025318418, which makes the suggested change to allow eslint 8. @jens-ox would you be able to merge this in...
Trying to update some of my packages and this lib has been really useful. Can put in PR for this to support peers 7 || 8 ``` "peerDependencies": { "eslint":...
Hi! Thanks for great rule, i've already clean a lot of unused styles. But for now css keyframes animation rules parsed incorrectly e.g.: ``` const useStyles = makeStyles(() => ({...
Was this ever intended to work destructured styles? ```js const { myStyle } = useStyles() ```
Classes which are imported from a file (usually styles.js in the same component directory) are not being checked: `import useStyles from "./styles";` `...` `const classes = useStyles();` The plugin seems...