diff --git a/packages/astro/src/core/config/tsconfig.ts b/packages/astro/src/core/config/tsconfig.ts index f0236309e492..25c9b01ba4c8 100644 --- a/packages/astro/src/core/config/tsconfig.ts +++ b/packages/astro/src/core/config/tsconfig.ts @@ -1,12 +1,12 @@ +import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; -import { readFile } from "node:fs/promises" import { TSConfckParseError, type TSConfckParseOptions, type TSConfckParseResult, find, parse, - toJson + toJson, } from 'tsconfck'; import type { CompilerOptions, TypeAcquisition } from 'typescript'; diff --git a/packages/astro/test/units/config/config-tsconfig.test.js b/packages/astro/test/units/config/config-tsconfig.test.js index f83e9bcc3036..a82ef8b25d7f 100644 --- a/packages/astro/test/units/config/config-tsconfig.test.js +++ b/packages/astro/test/units/config/config-tsconfig.test.js @@ -1,10 +1,10 @@ import * as assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; import * as path from 'node:path'; import { describe, it } from 'node:test'; import { fileURLToPath } from 'node:url'; -import { loadTSConfig, updateTSConfigForFramework } from '../../../dist/core/config/index.js'; -import { readFile } from 'node:fs/promises'; import { toJson } from 'tsconfck'; +import { loadTSConfig, updateTSConfigForFramework } from '../../../dist/core/config/index.js'; const cwd = fileURLToPath(new URL('../../fixtures/tsconfig-handling/', import.meta.url)); @@ -42,8 +42,9 @@ describe('TSConfig handling', () => { it('does not change baseUrl in raw config', async () => { const loadedConfig = await loadTSConfig(path.join(cwd, 'baseUrl')); - const rawConfig = await readFile(path.join(cwd, 'baseUrl', 'tsconfig.json'), 'utf-8').then(toJson) - .then((content) => JSON.parse(content)); + const rawConfig = await readFile(path.join(cwd, 'baseUrl', 'tsconfig.json'), 'utf-8') + .then(toJson) + .then((content) => JSON.parse(content)); assert.deepEqual(loadedConfig.rawConfig, rawConfig); });