Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.83 KB

README.md

File metadata and controls

61 lines (44 loc) · 1.83 KB

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-dev

Next, install @rkristelijn/eslint-plugin-mui:

npm install @rkristelijn/eslint-plugin-mui --save-dev

Usage

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

Credits

This plugin is based on eslint-plugin-sort-keys-fix (https://github.com/leo-buneev/eslint-plugin-sort-keys-fix).

Contributors