Skip to content

rkristelijn/eslint-plugin-mui

 
 

Repository files navigation

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

About

Custom ESLint rules for MUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%