From eb13f17742e7bc712b1dfc92049ba37782b6b743 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 29 May 2022 01:55:29 +0900 Subject: [PATCH] fix: enable ESLint for `__tests__` dir --- package.json | 2 +- packages/create-vite/__tests__/cli.spec.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6dde8708780745..51a60eebc90d7c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "scripts": { "preinstall": "npx only-allow pnpm", "format": "prettier --write .", - "lint": "eslint packages/*/{src,types}/** playground/**/__tests__/**/*.ts scripts/**", + "lint": "eslint packages/*/{src,types,__tests__}/** playground/**/__tests__/**/*.ts scripts/**", "typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit", "test": "run-s test-unit test-serve test-build", "test-serve": "vitest run -c vitest.config.e2e.ts", diff --git a/packages/create-vite/__tests__/cli.spec.ts b/packages/create-vite/__tests__/cli.spec.ts index fbfb606f486885..d9b6bafdefa306 100644 --- a/packages/create-vite/__tests__/cli.spec.ts +++ b/packages/create-vite/__tests__/cli.spec.ts @@ -1,9 +1,8 @@ -/* eslint-disable node/no-extraneous-import */ +import { join } from 'path' import type { ExecaSyncReturnValue, SyncOptions } from 'execa' import { commandSync } from 'execa' import { mkdirpSync, readdirSync, remove, writeFileSync } from 'fs-extra' -import { join } from 'path' -import { test, expect, beforeAll, afterEach } from 'vitest' +import { afterEach, beforeAll, expect, test } from 'vitest' const CLI_PATH = join(__dirname, '..')