From c2d857e4830e7044d7b7ec30ae5d93ca399b002f Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 12 Jul 2024 01:35:55 +0200 Subject: [PATCH] fix: remaining type issues --- biome.json | 10 ++++++ .../test/bad-styles/unclosed-style.ts | 5 +-- packages/compiler/test/parse/ast.ts | 9 +++--- packages/compiler/test/parse/escaping.ts | 2 +- packages/compiler/test/parse/fragment.ts | 9 +++--- .../test/parse/multibyte-characters.ts | 5 +-- packages/compiler/test/parse/orphan-head.ts | 4 +-- packages/compiler/test/parse/position.ts | 31 ++++++++++--------- packages/compiler/test/parse/serialize.ts | 2 +- packages/compiler/test/stress/index.ts | 2 +- packages/compiler/test/tsx-errors/eof.ts | 3 +- .../test/tsx-errors/fragment-shorthand.ts | 3 +- .../test/tsx-errors/unfinished-component.ts | 3 +- packages/compiler/test/tsx-sourcemaps/tags.ts | 2 +- packages/compiler/test/utils.ts | 4 +-- 15 files changed, 56 insertions(+), 38 deletions(-) diff --git a/biome.json b/biome.json index 26f9d9dc..4fdfd3fa 100644 --- a/biome.json +++ b/biome.json @@ -51,6 +51,16 @@ } }, "overrides": [ + { + "include": ["**/stress/**"], + "linter": { + "rules": { + "suspicious": { + "noConsoleLog": "off" + } + } + } + }, { "include": ["package.json"], "json": { diff --git a/packages/compiler/test/bad-styles/unclosed-style.ts b/packages/compiler/test/bad-styles/unclosed-style.ts index 93c468ca..4b1276af 100644 --- a/packages/compiler/test/bad-styles/unclosed-style.ts +++ b/packages/compiler/test/bad-styles/unclosed-style.ts @@ -1,10 +1,11 @@ import { type ParseResult, parse } from '@astrojs/compiler'; import { test } from 'uvu'; import * as assert from 'uvu/assert'; +import type { ElementNode } from '../../types.js'; test('can compile unfinished style', async () => { let error = 0; - let result: ParseResult; + let result: ParseResult = {} as ParseResult; try { result = await parse('