import * as path from 'path' ; export default function docsUrl ( ruleFileName ) { const ruleMarkdownDoc = path . basename ( ruleFileName ) . replace ( /\.[jt]s$/ , '.md' ) ; return `https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/${ ruleMarkdownDoc }` ; }