@@ -44,12 +44,7 @@ import {
4444import { TextDocument } from 'vscode-languageserver-textdocument' ;
4545
4646import { LSPFileSystemAdapter } from './adapters/fs' ;
47- import {
48- AGLINT_REPO_URL ,
49- EMPTY ,
50- LF ,
51- SPACE ,
52- } from './common/constants' ;
47+ import { EMPTY , LF , SPACE } from './common/constants' ;
5348import { defaultSettings , type ExtensionSettings } from './settings' ;
5449import { loadAglintModule , type LoadedAglint } from './utils/aglint-loader' ;
5550import { getErrorMessage , getErrorStack } from './utils/error' ;
@@ -211,17 +206,6 @@ const getVscodeCodeRangeFromAglintPositionRange = (range: LinterPositionRange):
211206 ) ;
212207} ;
213208
214- /**
215- * Get the documentation URL for the given AGLint rule.
216- *
217- * @param ruleId Rule ID.
218- *
219- * @returns Documentation URL.
220- */
221- const getAglintRuleDocumentationUrl = ( ruleId : string ) : string => {
222- return `${ AGLINT_REPO_URL } /blob/master/docs/rules/${ ruleId } .md` ;
223- } ;
224-
225209/**
226210 * Convert AGLint result to VSCode diagnostics.
227211 *
@@ -252,7 +236,7 @@ const getVscodeDiagnosticsFromLinterResult = (linterResult: LinterResult): Diagn
252236 if ( problem . ruleId ) {
253237 diagnostic . code = problem . ruleId ;
254238 diagnostic . codeDescription = {
255- href : getAglintRuleDocumentationUrl ( problem . ruleId ) ,
239+ href : aglint . linter . getAglintRuleDocumentationUrl ( problem . ruleId ) ,
256240 } ;
257241 }
258242
0 commit comments