Skip to content

4commerce-technologies-AG/eslint-plugin-material-ui-unused-classes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect unused Material-UI classes

This eslint plugin lets you detect unused Material UI classes:

Example image of the rule working

Usage

  1. Add the dependency:
npm i --save-dev eslint-plugin-mui-unused-classes
  1. Add it at the end of your plugin list in your .eslintrc.js:
module.exports = {
  // ...
  plugins: [
    // ...
    'mui-unused-classes'
  ]
}

That's it! You should now get a warning if you have unused classes. One could also make it an error by adding the actual rule to the rule entry in .eslintrc.js:

module.exports = {
  // ...
  plugins: [
    // ...
    'mui-unused-classes'
  ],
  rules: {
    'mui-unused-classes/unused-classes': 2
  }
}

About

Detect unused Material UI styling classes using eslint

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%