ESLint rules for enforcing best practices when using @movable/ui components
npm install @movable/eslint-plugin-uiESLint rules for enforcing best practices when using @movable/ui components.
``bash`
npm install @movable/eslint-plugin-ui --save-dev
`js
// eslint.config.js
import movableUI from '@movable/eslint-plugin-ui';
export default [
{
plugins: {
'@movable/ui': movableUI,
},
rules: {
...movableUI.configs.recommended.rules,
},
},
];
`
`json`
{
"plugins": ["@movable/ui"],
"extends": ["plugin:@movable/ui/recommended"]
}
Disallows importing the deprecated Grid component from MUI. Use Grid2 instead.
Bad:
`tsx`
import { Grid } from '@mui/material';
import Grid from '@mui/material/Grid';
Good:
`tsx`
import { Grid2 } from '@mui/material';
import Grid2 from '@mui/material/Grid2';
The recommended config enables all rules with their suggested severity:
| Rule | Severity |
|------|----------|
| @movable/ui/no-deprecated-grid | error |
Planned rules for future releases:
- prefer-ink-components - Suggest using Ink-wrapped components over raw MUI componentsInk{ComponentName}`)
- Auto-detection of new Ink components via naming convention (
See GitHub Issue #447 for the full roadmap.