0.0.6 • Published 7 months ago
eslint-plugin-mui-autofixer v0.0.6
eslint-plugin-mui-autofixer
ESLint plugin to automatically fix MUI imports in React from global to local so it won't affect bundle size.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-mui-autofixer
:
npm install eslint-plugin-mui-autofixer --save-dev
Usage
Add mui-autofixer
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"mui-autofixer"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"mui-autofixer/rule-name": ["error"]
}
}
Rules
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 🔧 |
---|---|---|
no-direct-components | MUI components should be imported from their corresponding folders | 🔧 |
no-direct-icons | MUI icons should be imported directly | 🔧 |