get-docs-url.js 500 B

1234567891011121314151617
  1. 'use strict'
  2. const REPO_URL = 'https://github.com/xjamundx/eslint-plugin-promise'
  3. /**
  4. * Generates the URL to documentation for the given rule name. It uses the
  5. * package version to build the link to a tagged version of the
  6. * documentation file.
  7. *
  8. * @param {string} ruleName - Name of the eslint rule
  9. * @returns {string} URL to the documentation for the given rule
  10. */
  11. function getDocsUrl(ruleName) {
  12. return `${REPO_URL}/blob/master/docs/rules/${ruleName}.md`
  13. }
  14. module.exports = getDocsUrl