Skip to content

Commit bcace0e

Browse files
committed
fix(core): add relatedInformation setter
1 parent e05416f commit bcace0e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,14 @@ export function createLinter(
211211
length: end - start,
212212
source: 'tsslint',
213213
get relatedInformation() {
214-
return getRelatedInformations(location[0], location[1]);
214+
return relatedInformation ??= getRelatedInformations(location[0], location[1]);
215+
},
216+
set relatedInformation(value) {
217+
relatedInformation = value;
215218
},
216219
};
217220
let location: [Error, number] = [new Error(), 1];
221+
let relatedInformation: ts.DiagnosticRelatedInformation[] | undefined;
218222
let cachedObj: ts.DiagnosticWithLocation | undefined;
219223

220224
if (cache && !rule2Mode.get(currentRuleId)) {

0 commit comments

Comments
 (0)