Skip to content

Commit

Permalink
chore: typecheck create-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Dec 9, 2022
1 parent 8241758 commit b3149b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"postinstall": "simple-git-hooks",
"format": "prettier --write --cache .",
"lint": "eslint --cache .",
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit && tsc -p packages/create-vite --noEmit",
"test": "run-s test-unit test-serve test-build",
"test-serve": "vitest run -c vitest.config.e2e.ts",
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-vite/__tests__/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ beforeAll(() => remove(genPath))
afterEach(() => remove(genPath))

test('prompts for the project name if none supplied', () => {
const { stdout, exitCode } = run([])
const { stdout } = run([])
expect(stdout).toContain('Project name:')
})

Expand Down
4 changes: 3 additions & 1 deletion packages/create-vite/build.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import path from 'node:path'
import url from 'node:url'
// eslint-disable-next-line node/no-extraneous-import
import type { Plugin } from 'rollup'
import { defineBuildConfig } from 'unbuild'
import licensePlugin from '../../scripts/rollupLicensePlugin.mjs'

Expand All @@ -23,7 +25,7 @@ export default defineBuildConfig({
if (!options.plugins) {
options.plugins = []
}
options.plugins.push(
;(options.plugins as Plugin[]).push(
licensePlugin(
path.resolve(__dirname, './LICENSE'),
'create-vite license',
Expand Down
3 changes: 2 additions & 1 deletion packages/create-vite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"include": ["src", "__tests__"],
"include": ["build.config.ts", "src", "__tests__"],
"compilerOptions": {
"outDir": "dist",
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "Node",
"strict": true,
"allowJs": true,
"declaration": false,
"sourceMap": false,
"noUnusedLocals": true,
Expand Down

0 comments on commit b3149b4

Please sign in to comment.