{"id":25512,"library":"eslint-plugin-grommet","title":"eslint-plugin-grommet","description":"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.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/grommet/eslint-plugin-grommet","tags":["javascript","eslint","eslintplugin","eslint-plugin","grommet","accessibility"],"install":[{"cmd":"npm install eslint-plugin-grommet","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-grommet","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-grommet","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to run the plugin","package":"eslint","optional":false}],"imports":[{"note":"Use 'plugin:grommet/recommended' to activate recommended rules. Plugins section is optional if using config only, but required for custom rule overrides.","wrong":"// Missing plugins or extension prefix\n{\n  \"extends\": [\"grommet/recommended\"]\n}","symbol":"plugin (recommended config)","correct":"// .eslintrc\n{\n  \"extends\": [\"plugin:grommet/recommended\"],\n  \"plugins\": [\"grommet\"]\n}"},{"note":"Rule names must be prefixed with 'grommet/'.","wrong":"{\n  \"rules\": {\n    \"anchor-label\": \"error\"\n  }\n}","symbol":"specific rule","correct":"// .eslintrc\n{\n  \"rules\": {\n    \"grommet/anchor-label\": \"error\"\n  }\n}"},{"note":"Package is 'eslint-plugin-grommet', not scoped.","wrong":"const plugin = require('@grommet/eslint-plugin-grommet');","symbol":"require in Node.js (CJS)","correct":"const plugin = require('eslint-plugin-grommet');"}],"quickstart":{"code":"// Install: npm install --save-dev eslint eslint-plugin-grommet\n// .eslintrc.json\n{\n  \"extends\": [\"plugin:grommet/recommended\"],\n  \"plugins\": [\"grommet\"],\n  \"rules\": {\n    \"grommet/anchor-label\": \"error\",\n    \"grommet/formfield-htmlfor-id\": \"warn\"\n  }\n}","lang":"json","description":"Shows installation and configuration to enable recommended rules and customize specific rules like 'anchor-label' and 'formfield-htmlfor-id'."},"warnings":[{"fix":"Use 'extends: [\"plugin:grommet/recommended\"]' and only disable rules sparingly after understanding consequences.","message":"Recommended config overrides may suppress important a11y checks.","severity":"gotcha","affected_versions":">=0.1.1"},{"fix":"Upgrade ESLint to >=7.31.0 (as per peerDependencies).","message":"ESLint peer dependency must be ^7.31.0 or later; older versions may cause unexpected behavior.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"If you need to override any rule, include \"plugins\": [\"grommet\"] in .eslintrc.","message":"Plugins array may be omitted if only using recommended config, but then custom rules won't work without it.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.2.0':24 '2023':27 '7.31.0':75 'a11y':19,63 'a11ytitle':42 'access':18,83 'anchor':33 'anchor-label':32 'best':15 'button':40 'button-icon-a11ytitle':39 'cadenc':51 'common':70 'complement':59 'compon':14 'current':20 'depend':73 'differenti':57 'enforc':12 'eslint':2,6,74,77,80 'eslint-plugin':79 'eslint-plugin-grommet':1 'eslintplugin':78 'etc':43 'featur':54 'follow':46 'formfield':36 'formfield-htmlfor-id':35 'grommet':4,13,60,82 'guidanc':64 'htmlfor':37 'icon':41 'id':38 'includ':29 'javascript':76 'key':56 'label':34 'like':31,50 'lint':9 'manual':67 'minor':53 'misus':71 'peer':72 'plugin':3,7,45,81 'practic':16 'provid':8 'reduc':66 'releas':25,55 'review':68 'rule':10,30 'semver':49 'semver-lik':48 'septemb':26 'stabl':21 'version':22","created_at":"2026-05-01T13:45:09.237370+00:00","updated_at":"2026-05-01T13:45:09.237370+00:00","problems":[{"fix":"Run npm install --save-dev eslint-plugin-grommet","cause":"Package not installed or symlinked incorrectly.","error":"ESLint couldn't find the plugin \"eslint-plugin-grommet\"."},{"fix":"Use 2 for error, 1 for warn, or 0 for off, or ensure your config format allows severity strings (ESLint supports strings).","cause":"Using a string like 'error' instead of numeric severity in some old config format.","error":"Configuration for rule \"grommet/anchor-label\" is invalid: Severity should be one of: 0, 1, 2 (off, warn, error)."},{"fix":"Ensure plugin is in plugins array and you're using v0.2.0 or later.","cause":"Plugin not loaded or rule not available in the version.","error":"Rule 'grommet/formfield-htmlfor-id' is not defined in the config."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/grommet/eslint-plugin-grommet","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-grommet","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}