diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9fb2d0be78ec7..81d618900fa4e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: run: yarn install --frozen-lockfile - name: Build vite - run: yarn build-vite + run: yarn ci-build-vite - name: Build plugin-vue run: yarn build-plugin-vue @@ -91,7 +91,7 @@ jobs: - name: Prepare run: | yarn install --frozen-lockfile - yarn build-vite + yarn ci-build-vite yarn build-plugin-vue - name: Lint diff --git a/package.json b/package.json index 15776aaab08da5..6f134ffbd374a3 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "build": "run-s build-vite build-plugin-vue", "build-vite": "cd packages/vite && yarn build", "build-plugin-vue": "cd packages/plugin-vue && yarn build", + "ci-build-vite": "cd packages/vite && yarn ci-build", "ci-docs": "run-s build-vite build-plugin-vue build-docs" }, "devDependencies": { diff --git a/packages/plugin-react-refresh/index.js b/packages/plugin-react-refresh/index.js index 876577af59a634..bf3c5980ebbf2b 100644 --- a/packages/plugin-react-refresh/index.js +++ b/packages/plugin-react-refresh/index.js @@ -202,8 +202,8 @@ function isRefreshBoundary(ast) { const { declaration, specifiers } = node if (declaration) { if (declaration.type === 'VariableDeclaration') { - return declaration.declarations.every( - (variable) => isComponentLikeIdentifier(variable.id) + return declaration.declarations.every((variable) => + isComponentLikeIdentifier(variable.id) ) } if (declaration.type === 'FunctionDeclaration') { diff --git a/packages/vite/package.json b/packages/vite/package.json index 0f1344202d1bcd..2bbbea8812a665 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -36,6 +36,7 @@ "build-bundle": "rollup -c", "build-types": "run-s build-temp-types patch-types roll-types", "build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node", + "ci-build": "rimraf dist && yarn run-s build-bundle build-types", "patch-types": "node scripts/patchTypes", "roll-types": "api-extractor run && rimraf temp", "lint": "eslint --ext .ts src/**", diff --git a/scripts/jestPerTestSetup.ts b/scripts/jestPerTestSetup.ts index 42dc4f0c7566be..5ddc938db28357 100644 --- a/scripts/jestPerTestSetup.ts +++ b/scripts/jestPerTestSetup.ts @@ -10,6 +10,7 @@ const isBuildTest = !!process.env.VITE_TEST_BUILD // injected by the test env declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace namespace NodeJS { interface Global { page?: Page @@ -102,7 +103,7 @@ beforeAll(async () => { // https://github.com/facebook/jest/issues/2713 err = e - // Closing the page since an error in the setup, for example a runtime error + // Closing the page since an error in the setup, for example a runtime error // when building the playground should skip further tests. // If the page remains open, a command like `await page.click(...)` produces // a timeout with an exception that hides the real error in the console.