{"name":"eslint-rule-documentation","version":"1.0.14","description":"Find the url for the documentation of an ESLint rule","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jfmengels/eslint-rule-documentation.git"},"author":{"name":"Jeroen Engels","email":"jfm.engels@gmail.com","url":"github.com/jfmengels"},"engines":{"node":">=4.0.0"},"scripts":{"test":"xo && ava"},"files":["index.js","plugins.json"],"keywords":["eslint","eslintplugin","eslint-plugin","plugin","plugins","rule","rules","doc","documentation"],"devDependencies":{"ava":"^0.15.2","xo":"^0.16.0"},"xo":{"space":2},"gitHead":"81654a4922311233eefc9efc4d3459392da60311","bugs":{"url":"https://github.com/jfmengels/eslint-rule-documentation/issues"},"homepage":"https://github.com/jfmengels/eslint-rule-documentation#readme","_id":"eslint-rule-documentation@1.0.14","_npmVersion":"5.3.0","_nodeVersion":"8.2.0","_npmUser":{"name":"arcanemagus","email":"landonabney@gmail.com"},"dist":{"integrity":"sha512-nbGOHUKPEazOgTA1Fmf0gRQrL+hUkewI91TN+1Ii6Le988A/72ztJHVfpPoUDnjrIm1a5fSQ/xyRnER1nWSJmw==","shasum":"599ca9e2d0887a46a21e9e6f9a3e54dc6bbfee23","tarball":"http://registry-npm.ywwl.com/eslint-rule-documentation/download/eslint-rule-documentation-1.0.14.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCissDU6pxqyrXOXa9tOcDk0f4uAeJtY5JRFN1zX08KKAIhAKnwOG2dUvzZofKAeNI7lTe+PxSUCvZ7fjla876gbzFd"}],"size":2866,"noattachment":false,"key":"/eslint-rule-documentation/-/eslint-rule-documentation-1.0.14.tgz"},"maintainers":[{"name":"arcanemagus","email":"landonabney@gmail.com"},{"name":"jfmengels","email":"jfm.engels@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-rule-documentation-1.0.14.tgz_1500581053725_0.23568665189668536"},"directories":{},"readme":"# eslint-rule-documentation [![Build Status](https://travis-ci.org/jfmengels/eslint-rule-documentation.svg?branch=master)](https://travis-ci.org/jfmengels/eslint-rule-documentation)\r\n\r\n> Find the url for the documentation of an [ESLint] rule\r\n\r\n\r\n## Install\r\n\r\n```\r\n$ npm install --save eslint-rule-documentation\r\n```\r\n\r\n\r\n## Usage\r\n\r\n```js\r\nconst getRuleURI = require('eslint-rule-documentation');\r\n\r\n// find url for core rules\r\ngetRuleURI('no-var');\r\n// => { found: true, url: 'https://eslint.org/docs/rules/no-var' }\r\n\r\n// find url for known plugins\r\ngetRuleURI('import/no-unresolved');\r\n// => { found: true, url: 'https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md' }\r\n\r\n// If the plugin is not known, get a link to help improve this\r\ngetRuleURI('unknown-foo/bar');\r\n// => { found: false, url: 'https://github.com/jfmengels/eslint-rule-documentation/blob/master/contributing.md' }\r\n```\r\n\r\n## Contributing\r\n\r\nIf you find a plugin that you use is not in the [list of supported plugins](./plugins.json), please consider adding it to the project by following the instructions [here](./contributing.md).\r\n\r\n\r\n## API\r\n\r\n### getRuleURI(ruleId)\r\n\r\n\r\n\r\n#### ruleId\r\n\r\nType: `string`\r\n\r\nId of an [ESLint] rule.\r\n\r\nExamples:\r\n- core rule: `no-var`\r\n- plugin rule: `import/no-unresolved` (from the [eslint-plugin-import] plugin).\r\n\r\n#### returns\r\n\r\nType: `object`\r\n\r\n```js\r\n{\r\n  found: <boolean>,\r\n  url: <string>\r\n}\r\n```\r\n\r\n- `found`: `true` if the rule is an ESLint core rule, or a rule of a known plugin, `false` otherwise.\r\n- `url`: if `found` is `true`, url of the documentation of a rule. If `found` is `false`, url of the [contribution guidelines](./contributing.md).\r\n\r\n## Thanks\r\n\r\nSpecial thanks to the team behind [linter-eslint] for the original work, and the people who contributed there.\r\n\r\n\r\n## License\r\n\r\nMIT © [Jeroen Engels](https://github.com/jfmengels)\r\n\r\n[eslint-plugin-import]: https://github.com/benmosher/eslint-plugin-import\r\n[ESLint]: https://eslint.org/\r\n[linter-eslint]: https://github.com/AtomLinter/linter-eslint\r\n","publish_time":1500581053830,"_cnpm_publish_time":1500581053830,"dist-tags":{"latest":"1.0.23"}}