Skip to content

Commit bf70419

Browse files
feat: create rules with exact version link
This will help clarify which documentation applies to your installed version.
1 parent 0ce72d3 commit bf70419

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ESLintUtils, TSESLint } from '@typescript-eslint/utils';
2+
import { version } from '../package.json';
23

34
export function createRegExpForWords(
45
config: string | string[],
@@ -26,7 +27,9 @@ export interface RxjsXRuleDocs {
2627
requiresTypeChecking?: boolean;
2728
}
2829

30+
const REPO_URL = 'https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x';
31+
2932
export const ruleCreator = ESLintUtils.RuleCreator<RxjsXRuleDocs>(
3033
(name) =>
31-
`https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/${name}.md`,
34+
`${REPO_URL}/blob/v${version}/docs/rules/${name}.md`,
3235
);

0 commit comments

Comments
 (0)