Skip to content

Commit

Permalink
chore: bump lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 15, 2024
1 parent be93dbb commit 58a8202
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/language-core/lib/plugins/vue-tsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const plugin: VueLanguagePlugin = ctx => {
if (!tsCodegen.has(sfc)) {
tsCodegen.set(sfc, createTsx(fileName, sfc, ctx));
}
return tsCodegen.get(sfc);
return tsCodegen.get(sfc)!;
}
};

Expand Down
8 changes: 4 additions & 4 deletions packages/language-core/lib/virtualFile/computedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function computedPluginFiles(

const { file, snapshot } = _file();
const mappings = buildMappings(file.content);
let lastValidMapping: typeof mappings[number];
let lastValidMapping: typeof mappings[number] | undefined;

for (const mapping of mappings) {
if (mapping.source !== undefined) {
Expand All @@ -196,9 +196,9 @@ function computedPluginFiles(
mapping.source = undefined;
}
if (mapping.data.__combineLastMapping) {
lastValidMapping.sourceOffsets.push(...mapping.sourceOffsets);
lastValidMapping.generatedOffsets.push(...mapping.generatedOffsets);
lastValidMapping.lengths.push(...mapping.lengths);
lastValidMapping!.sourceOffsets.push(...mapping.sourceOffsets);
lastValidMapping!.generatedOffsets.push(...mapping.generatedOffsets);
lastValidMapping!.lengths.push(...mapping.lengths);
continue;
}
else {
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 58a8202

Please sign in to comment.