An ESLint plugin providing lint rules for enforcing Grommet component best practices and accessibility (a11y). Current stable version is 0.2.0, released September 2023. It includes rules like anchor-label, formfield-htmlfor-id, button-icon-a11ytitle, etc. The plugin follows a semver-like cadence with minor feature releases. Key differentiators: it complements Grommet's own a11y guidance and reduces manual review for common misuses. Peer dependency: eslint ^7.31.0.
npm install eslint-plugin-grommetNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation and configuration to enable recommended rules and customize specific rules like 'anchor-label' and 'formfield-htmlfor-id'.
Use 'extends: ["plugin:grommet/recommended"]' and only disable rules sparingly after understanding consequences.
Upgrade ESLint to >=7.31.0 (as per peerDependencies).
If you need to override any rule, include "plugins": ["grommet"] in .eslintrc.
Run npm install --save-dev eslint-plugin-grommet
Use 2 for error, 1 for warn, or 0 for off, or ensure your config format allows severity strings (ESLint supports strings).
Ensure plugin is in plugins array and you're using v0.2.0 or later.