Skip to content

Commit 3414c9f

Browse files
committed
let's just add a linting step to our create flavors
1 parent ce6a297 commit 3414c9f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/create/test/check.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url';
55
import { exec, type PromiseWithChild } from 'node:child_process';
66
import { beforeAll, describe, test } from 'vitest';
77
import { create, type LanguageType, type TemplateType } from '../index.ts';
8+
import { installAddon, officialAddons } from '../../cli/lib/index.ts';
89

910
// Resolve the given path relative to the current file
1011
const resolve_path = (path: string) => fileURLToPath(new URL(path, import.meta.url));
@@ -42,13 +43,13 @@ for (const template of templates) {
4243
fs.rmSync(cwd, { recursive: true, force: true });
4344

4445
create(cwd, { name: `create-svelte-test-${template}-${types}`, template, types });
46+
await installAddon({ cwd, addons: { eslint: officialAddons.eslint }, options: { eslint: {} } });
4547

4648
const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf-8'));
4749

4850
// run provided scripts that are non-blocking. All of them should exit with 0
4951
// package script requires lib dir
50-
// TODO: lint should run before format
51-
const scripts_to_test = ['format', 'lint', 'check', 'build', 'package'].filter(
52+
const scripts_to_test = ['lint', 'format', 'check', 'build', 'package'].filter(
5253
(s) => s in pkg.scripts
5354
);
5455

0 commit comments

Comments
 (0)