{"id":19998,"library":"eslint-rule-documentation","title":"eslint-rule-documentation","description":"A utility to retrieve the documentation URL for any ESLint rule, including core rules and many popular plugin rules. Current version 1.0.23 supports dozens of plugins like eslint-plugin-import, jest, react, typescript, and more. Updated periodically with contributions. Differentiates by being lightweight and community-driven for plugin URL mappings, unlike built-in ESLint lookups.","status":"active","version":"1.0.23","language":"javascript","source_language":"en","source_url":"https://github.com/jfmengels/eslint-rule-documentation","tags":["javascript","eslint","eslintplugin","eslint-plugin","plugin","plugins","rule","rules","doc"],"install":[{"cmd":"npm install eslint-rule-documentation","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-rule-documentation","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-rule-documentation","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses CommonJS; no named exports. If using ES modules, use createRequire or dynamic import().","wrong":"import getRuleURI from 'eslint-rule-documentation';","symbol":"default","correct":"const getRuleURI = require('eslint-rule-documentation');"},{"note":"Function is default export only; destructured import will fail.","wrong":"import { getRuleURI } from 'eslint-rule-documentation';","symbol":"getRuleURI","correct":"const getRuleURI = require('eslint-rule-documentation');"},{"note":"In CommonJS, .default is undefined; use plain require().","wrong":"const getRuleURI = require('eslint-rule-documentation').default;","symbol":"getRuleURI","correct":"import getRuleURI from 'eslint-rule-documentation'; // With esm shim"}],"quickstart":{"code":"const getRuleURI = require('eslint-rule-documentation');\n\nconsole.log(getRuleURI('no-var'));\n// { found: true, url: 'https://eslint.org/docs/rules/no-var' }\n\nconsole.log(getRuleURI('import/no-unresolved'));\n// { found: true, url: 'https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md' }","lang":"javascript","description":"Shows basic usage: get documentation URL for a core ESLint rule and a plugin rule."},"warnings":[{"fix":"Always check `result.found` before using `result.url`.","message":"The function returns an object with `found` and `url`; check `found` before using `url` to avoid linking to contribution page.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure ruleId is a string: `getRuleURI(String(ruleId))`.","message":"Version 1.0.15: throws if ruleId is not a string (previously returned an object with found=false).","severity":"breaking","affected_versions":">=1.0.15"},{"fix":"Check the plugin's actual docs or contribute updates to eslint-rule-documentation's plugins.json.","message":"No deprecations known, but many plugin URLs change; the package may not always be up-to-date.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use `const getRuleURI = require('eslint-rule-documentation');`","cause":"Using mismatched import style (e.g., import { getRuleURI } from '...') in CommonJS.","error":"TypeError: getRuleURI is not a function"},{"fix":"Ensure ruleId is a string: `getRuleURI(String(ruleId))`","cause":"Passing a non-string argument (e.g., number, object) to getRuleURI.","error":"TypeError: ruleId must be a string"},{"fix":"Run `npm install eslint-rule-documentation` or `yarn add eslint-rule-documentation`.","cause":"Package not installed in node_modules.","error":"Cannot find module 'eslint-rule-documentation'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}