Skip to content

Commit 11c7a09

Browse files
feat: create rules with exact version link
1 parent b5d2ef7 commit 11c7a09

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,12 +1,15 @@
11
import { ESLintUtils, TSESLint } from '@typescript-eslint/utils';
2+
import { version } from '../package.json';
23

34
export interface RxjsAngularXRuleDocs {
45
description: string;
56
recommended?: TSESLint.RuleRecommendation | TSESLint.RuleRecommendationAcrossConfigs<unknown[]>;
67
requiresTypeChecking?: boolean;
78
}
89

10+
const REPO_URL = 'https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x';
11+
912
export const ruleCreator = ESLintUtils.RuleCreator<RxjsAngularXRuleDocs>(
1013
(name) =>
11-
`https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x/tree/main/docs/rules/${name}.md`,
14+
`${REPO_URL}/blob/v${version}/docs/rules/${name}.md`,
1215
);

0 commit comments

Comments
 (0)