diff --git a/.changeset/tiny-donuts-smell.md b/.changeset/tiny-donuts-smell.md new file mode 100644 index 0000000..0c99c5f --- /dev/null +++ b/.changeset/tiny-donuts-smell.md @@ -0,0 +1,5 @@ +--- +'@mheob/eslint-config': patch +--- + +Ensure all needed packages are installed at using Astro. diff --git a/packages/eslint-config/src/configs/astro.ts b/packages/eslint-config/src/configs/astro.ts index bc896bd..b348315 100644 --- a/packages/eslint-config/src/configs/astro.ts +++ b/packages/eslint-config/src/configs/astro.ts @@ -1,12 +1,14 @@ import { GLOB_ASTRO } from '../globs'; import type { OptionsFiles, OptionsOverrides, TypedFlatConfigItem } from '../types'; -import { interopDefault } from '../utils'; +import { ensurePackages, interopDefault } from '../utils'; export async function astro( options: OptionsFiles & OptionsOverrides = {}, ): Promise { const { files = [GLOB_ASTRO], overrides = {} } = options; + await ensurePackages(['eslint-plugin-astro', 'astro-eslint-parser', '@typescript-eslint/parser']); + const [pluginAstro, parserAstro, parserTs] = await Promise.all([ interopDefault(import('eslint-plugin-astro')), interopDefault(import('astro-eslint-parser')),