ESLint plugin providing Chakra UI-specific linting rules including props ordering, shorthand enforcement, and component substitution. Current stable version 0.12.0 supports flat ESLint config, requires @typescript-eslint/parser v8+ and ESLint >=6, and works with TypeScript 4.4+. It uses TypeScript type information to detect Chakra components, so it integrates with typed linting. Unlike generic prop-sorting plugins, it understands Chakra's semantic prop groupings and shorthand mappings. The plugin is actively maintained with frequent releases and all rules are auto-fixable. It depends on Chakra UI's knowledge base but not on the library itself, making it suitable for any codebase using Chakra UI components.
npm install eslint-plugin-chakra-uiVerified import paths — ran on the pinned version, not inferred.
Shows flat ESLint config setup with @typescript-eslint/parser and recommended rules for Chakra UI.
Upgrade @typescript-eslint/parser and @typescript-eslint/eslint-plugin to v6 or higher.
Review and update snapshots; run eslint --fix to apply new order.
Install @typescript-eslint/parser and configure parserOptions.project and tsconfigRootDir.
Migrate to flat config using eslint.config.js and import plugin as default.
Ensure components are imported from '@chakra-ui/react' or similar known sources.
npm install @typescript-eslint/parser --save-dev
Add parser: '@typescript-eslint/parser' to languageOptions.
Use default import: import chakraUiPlugin from 'eslint-plugin-chakra-ui'; then chakraUiPlugin.configs.recommended.