File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { ESLintUtils } from '@typescript-eslint/experimental-utils' ;
2
2
3
- // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
4
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
5
- const version : string = require ( '../../package.json' ) . version ;
6
-
7
3
export const createRule = ESLintUtils . RuleCreator (
8
- name =>
9
- `https://github.com/typescript-eslint/typescript-eslint/blob/v${ version } /packages/eslint-plugin/docs/rules/${ name } .md` ,
4
+ name => `https://typescript-eslint.io/rules/${ name } ` ,
10
5
) ;
Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ describe('Validating rule metadata', () => {
118
118
it ( '`name` field in rule must match the filename' , ( ) => {
119
119
// validate if rule name is same as url
120
120
// there is no way to access this field but its used only in generation of docs url
121
- expect (
122
- rule . meta . docs ?. url ?. endsWith ( ` rules/${ ruleName } .md` ) ,
123
- ) . toBeTruthy ( ) ;
121
+ expect ( rule . meta . docs ?. url ) . toBe (
122
+ `https://typescript-eslint.io/ rules/${ ruleName } ` ,
123
+ ) ;
124
124
} ) ;
125
125
126
126
it ( '`requiresTypeChecking` should be set if the rule uses type information' , ( ) => {
You can’t perform that action at this time.
0 commit comments