1.2.1 • Published 7 months ago
@rkristelijn/eslint-plugin-mui v1.2.1
eslint-plugin-mui
Custom ESLint rules for MUI.
Note: This is a fork of eslint-plugin-mui that seems to be not being worked on.
Installation
You'll first need to install ESLint:
npm install eslint --save-devNext, install @rkristelijn/eslint-plugin-mui:
npm install @rkristelijn/eslint-plugin-mui --save-devUsage
Add mui to the plugins section of your eslint.config.cjs configuration file.
const muiPlugin = require('eslint-plugin-mui');
module.exports = [
plugins: {
mui: muiPlugin,
},
rules: {
// adding the recommended rules
'mui/sort-sx-keys': 'warn',
'mui/prefer-named-imports': 'warn',
'mui/no-literal-colors': 'warn',
'mui/no-grid-alias': 'warn'
'mui/no-single-child-in-grid': 'warn',
'mui/no-single-child-in-stack': 'warn'
},
]Supported Rules
- sort-sx-keys
- prefer-named-imports
- no-literal-color
- no-grid-alias
- no-single-child-in-grid
- no-single-child-in-stack
Credits
This plugin is based on eslint-plugin-sort-keys-fix (https://github.com/leo-buneev/eslint-plugin-sort-keys-fix).
Contributors
- rkristelijn
- Ensar025
- rafaelgomesxyz (original author)