import type EsLintRule from '../EsLintRule' ; param rule returns export default function createRuleMarkdown ( rule ) { const description = rule . fullDescription ? rule . fullDescription . replace ( /^# .+$/ , '' ) : rule . description ; return `# ${ rule . name }
> 来自 [${ rule . category }](${ rule . categoryUrl }) 的规则。

${ description }

## 参考文档

- [${ rule . name } 官方文档](${ rule . link })
${ rule . cnLink ? `- [${ rule . name } 中文教程](${ rule . cnLink })` : '' }
  ` ; }