{"id":19829,"library":"eslint-plugin-material-ui","title":"eslint-plugin-material-ui","description":"Custom ESLint rules for Material-UI projects. Version 1.0.1 is the latest release. This plugin provides a small set of linting rules, such as ignore-before-comment, to enforce code conventions in Material-UI codebases. It is maintained by the Material-UI team, but offers limited rules compared to more comprehensive style linting tools. The plugin follows standard ESLint plugin conventions and requires peer dependency eslint (any version). It is compatible with both CommonJS and ESM ESLint configs.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","eslint","eslintplugin","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-material-ui","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-material-ui","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-material-ui","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESLint plugins are referenced by their short name in config files.","wrong":"const plugin = require('eslint-plugin-material-ui'); // Not needed for plugin registration","symbol":"ESLint plugin","correct":"// In .eslintrc\n{\n  \"plugins\": [\"material-ui\"]\n}"},{"note":"Rules are prefixed with 'material-ui/' and can use severity levels 0/1/2 or 'off'/'warn'/'error'.","wrong":"rules: { 'material-ui/ignore-before-comment': 2 } // Valid but less semantic","symbol":"Rule configuration","correct":"// In .eslintrc\n{\n  \"rules\": {\n    \"material-ui/ignore-before-comment\": \"warn\"\n  }\n}"}],"quickstart":{"code":"// 1. Install dependencies\nnpm install eslint eslint-plugin-material-ui --save-dev\n\n// 2. Create .eslintrc.json\n{\n  \"plugins\": [\"material-ui\"],\n  \"rules\": {\n    \"material-ui/ignore-before-comment\": \"error\"\n  }\n}\n\n// 3. Example code that triggers the rule\n// Code with a comment before ignored block\n// eslint-disable-next-line material-ui/ignore-before-comment\nconst x = 1;","lang":"javascript","description":"Set up ESLint with eslint-plugin-material-ui and configure a rule."},"warnings":[{"fix":"Use additional plugins like eslint-plugin-react or eslint-plugin-material-ui (community) for broader coverage.","message":"The plugin only includes one rule ('ignore-before-comment') as of v1.0.1. Do not expect comprehensive Material-UI linting.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"","message":"No known deprecated rules.","severity":"deprecated","affected_versions":""}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-material-ui --save-dev' from the project root.","cause":"Missing or not installed in the local node_modules.","error":"ESLint couldn't find the plugin \"eslint-plugin-material-ui\"."},{"fix":"Match the installation scope: if ESLint is global, install the plugin globally; if local, install locally.","cause":"Global ESLint installation with local plugin or vice versa.","error":"Error: Failed to load plugin 'material-ui': Cannot find module 'eslint-plugin-material-ui'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}