A utility library (v1.1.235) that returns the documentation URL for a given ESLint rule, supporting both core rules and known plugins. Updated daily via cron job to keep plugin mappings current. Differentiates itself from manual lookup by providing exact-match URLs for core rules, per-plugin documentation for known plugins (e.g., React, Flowtype), and fallback to repository URL or empty object for unknown plugins. Works in Node.js with CommonJS/ESM.
npm install eslint-rule-docsVerified import paths — ran on the pinned version, not inferred.
Demonstrates usage to get rule documentation URLs for core ESLint rules, plugin rules, and unknown rules.
Use the official rule name (kebab-case for core rules, slash-separated for plugins).
Check if result has an 'exactMatch' property or a 'url' property to determine if it was found.
Do not rely on the URL being permanent; always fetch the latest version of the library.
Check ESLint core rules documentation for removed rules; the library may still return old URLs.
If you need multiple URLs, consider additional sources or fork the package.
Run `npm install eslint-rule-docs`
Use `import getRuleUrl from 'eslint-rule-docs'` or `const getRuleUrl = require('eslint-rule-docs')`Import default: `import getRuleUrl from 'eslint-rule-docs'`
Check the list of supported plugins; if missing, contribute to the database or use the fallback manual URL.
No dependency data recorded yet.