Fix validate-jsdoc-codeblocks rule to run diagnostics using latest file contents (#1310)

This commit is contained in:
Som Shekhar Mukherjee 2025-12-08 19:16:16 +05:30 committed by GitHub
parent c1dcd875af
commit 931fabac9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,12 @@ export const validateJSDocCodeblocksRule = /** @type {const} */ ({
return {};
}
try {
env.updateFile(context.filename, context.sourceCode.getText());
} catch {
// Ignore
}
return {
TSTypeAliasDeclaration(node) {
const {parent} = node;