Skip to content

Commit 4e8ffd8

Browse files
fix(ci): fix ci lint step (#2988)
Co-authored-by: nihalgonsalves <[email protected]>
1 parent 1e604d5 commit 4e8ffd8

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: yarn install --frozen-lockfile
5656

5757
- name: Build vite
58-
run: yarn build-vite
58+
run: yarn ci-build-vite
5959

6060
- name: Build plugin-vue
6161
run: yarn build-plugin-vue
@@ -91,7 +91,7 @@ jobs:
9191
- name: Prepare
9292
run: |
9393
yarn install --frozen-lockfile
94-
yarn build-vite
94+
yarn ci-build-vite
9595
yarn build-plugin-vue
9696
9797
- name: Lint

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"build": "run-s build-vite build-plugin-vue",
1919
"build-vite": "cd packages/vite && yarn build",
2020
"build-plugin-vue": "cd packages/plugin-vue && yarn build",
21+
"ci-build-vite": "cd packages/vite && yarn ci-build",
2122
"ci-docs": "run-s build-vite build-plugin-vue build-docs"
2223
},
2324
"devDependencies": {

packages/plugin-react-refresh/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ function isRefreshBoundary(ast) {
202202
const { declaration, specifiers } = node
203203
if (declaration) {
204204
if (declaration.type === 'VariableDeclaration') {
205-
return declaration.declarations.every(
206-
(variable) => isComponentLikeIdentifier(variable.id)
205+
return declaration.declarations.every((variable) =>
206+
isComponentLikeIdentifier(variable.id)
207207
)
208208
}
209209
if (declaration.type === 'FunctionDeclaration') {

packages/vite/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"build-bundle": "rollup -c",
3737
"build-types": "run-s build-temp-types patch-types roll-types",
3838
"build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
39+
"ci-build": "rimraf dist && yarn run-s build-bundle build-types",
3940
"patch-types": "node scripts/patchTypes",
4041
"roll-types": "api-extractor run && rimraf temp",
4142
"lint": "eslint --ext .ts src/**",

scripts/jestPerTestSetup.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const isBuildTest = !!process.env.VITE_TEST_BUILD
1010

1111
// injected by the test env
1212
declare global {
13+
// eslint-disable-next-line @typescript-eslint/no-namespace
1314
namespace NodeJS {
1415
interface Global {
1516
page?: Page
@@ -102,7 +103,7 @@ beforeAll(async () => {
102103
// https://github.com/facebook/jest/issues/2713
103104
err = e
104105

105-
// Closing the page since an error in the setup, for example a runtime error
106+
// Closing the page since an error in the setup, for example a runtime error
106107
// when building the playground should skip further tests.
107108
// If the page remains open, a command like `await page.click(...)` produces
108109
// a timeout with an exception that hides the real error in the console.

0 commit comments

Comments
 (0)