eslint-plugin-depend
Version:
An ESLint plugin to suggest optimized dependencies, native alternatives and more
25 lines (24 loc) • 765 B
JavaScript
/**
* Generates a standard URL to the docs of a given rule
* @param {string} name Rule name
* @return {string}
*/
export function getDocsUrl(name) {
return `https://github.com/es-tooling/eslint-plugin-depend/blob/main/docs/rules/${name}.md`;
}
/**
* Generates a URL for the given path on MDN
* @param {string} path Docs path
* @return {string}
*/
export function getMdnUrl(path) {
return `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/${path}`;
}
/**
* Generates a URL for module-replacements documentation for a given path
* @param {string} path Docs path
* @return {string}
*/
export function getReplacementsDocUrl(path) {
return `https://github.com/es-tooling/module-replacements/blob/main/docs/modules/${path}.md`;
}