diff --git a/.github/workflows/test.yml b/.github/workflows/ci-test.yml similarity index 72% rename from .github/workflows/test.yml rename to .github/workflows/ci-test.yml index 7ce6d9c256..93dacd7ffa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci-test.yml @@ -45,8 +45,23 @@ jobs: restore-keys: | ${{ runner.os }}-pnpm-store- + - name: Setup ESLint cache + uses: actions/cache@v3 + with: + path: .eslintcache + key: | + ${{ runner.os }}-eslint-${{ hashFiles('.eslintrc.js') }} + restore-keys: | + ${{ runner.os }}-eslint- + - name: Install dependencies run: pnpm install - - name: Testing + - name: 🩺 Run Test run: pnpm run test + + - name: 🌡️ Run ESLint + run: pnpm run lint + + - name: 🧼 Type checking + run: npx tsc --noEmit diff --git a/examples/univer-doc-ts/tsconfig.json b/examples/univer-doc-ts/tsconfig.json index 6d32a92259..ad04472d32 100644 --- a/examples/univer-doc-ts/tsconfig.json +++ b/examples/univer-doc-ts/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "downlevelIteration": true, "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true diff --git a/examples/univer-sheet-ts/tsconfig.json b/examples/univer-sheet-ts/tsconfig.json index 35a084b0f0..f946383d48 100644 --- a/examples/univer-sheet-ts/tsconfig.json +++ b/examples/univer-sheet-ts/tsconfig.json @@ -4,7 +4,6 @@ "rootDir": "./", "outDir": "lib", "module": "commonjs", - "moduleResolution": "Node", //This value is needed for Node.js. "downlevelIteration": true, "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true diff --git a/examples/univer-slide-ts/tsconfig.json b/examples/univer-slide-ts/tsconfig.json index 6d32a92259..ad04472d32 100644 --- a/examples/univer-slide-ts/tsconfig.json +++ b/examples/univer-slide-ts/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "downlevelIteration": true, "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true diff --git a/examples/univer-vanilla-ts/tsconfig.json b/examples/univer-vanilla-ts/tsconfig.json index 6d32a92259..ad04472d32 100644 --- a/examples/univer-vanilla-ts/tsconfig.json +++ b/examples/univer-vanilla-ts/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "downlevelIteration": true, "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true diff --git a/packages/base-docs/tsconfig.json b/packages/base-docs/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/base-docs/tsconfig.json +++ b/packages/base-docs/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/base-formula-engine/tsconfig.json b/packages/base-formula-engine/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/base-formula-engine/tsconfig.json +++ b/packages/base-formula-engine/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/base-numfmt-engine/tsconfig.json b/packages/base-numfmt-engine/tsconfig.json index d59c3caa7b..9972dfa9b5 100644 --- a/packages/base-numfmt-engine/tsconfig.json +++ b/packages/base-numfmt-engine/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", "baseUrl": "./", "esModuleInterop": true, }, diff --git a/packages/base-render/tsconfig.json b/packages/base-render/tsconfig.json index 08bec9af04..a5bf44cc25 100644 --- a/packages/base-render/tsconfig.json +++ b/packages/base-render/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", // "paths": { // "@*": ["src/*"] diff --git a/packages/base-sheets/tsconfig.json b/packages/base-sheets/tsconfig.json index 46f5f6b59e..e8499b8f83 100644 --- a/packages/base-sheets/tsconfig.json +++ b/packages/base-sheets/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "paths": { "@*": [ diff --git a/packages/base-slides/tsconfig.json b/packages/base-slides/tsconfig.json index 9c073276de..0c75433426 100644 --- a/packages/base-slides/tsconfig.json +++ b/packages/base-slides/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/base-ui/tsconfig.json b/packages/base-ui/tsconfig.json index 3ae9b987cd..cea4944532 100644 --- a/packages/base-ui/tsconfig.json +++ b/packages/base-ui/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false, diff --git a/packages/common-plugin-data/tsconfig.json b/packages/common-plugin-data/tsconfig.json index 118e8279ff..69c12276c4 100644 --- a/packages/common-plugin-data/tsconfig.json +++ b/packages/common-plugin-data/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "jsx": "preserve", diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index b16fb124d0..4bcf550741 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "downlevelIteration": true, "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true diff --git a/packages/sheets-plugin-filter/tsconfig.json b/packages/sheets-plugin-filter/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/sheets-plugin-filter/tsconfig.json +++ b/packages/sheets-plugin-filter/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-find/tsconfig.json b/packages/sheets-plugin-find/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/sheets-plugin-find/tsconfig.json +++ b/packages/sheets-plugin-find/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-formula/tsconfig.json b/packages/sheets-plugin-formula/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/sheets-plugin-formula/tsconfig.json +++ b/packages/sheets-plugin-formula/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-image/tsconfig.json b/packages/sheets-plugin-image/tsconfig.json index 22e90e4c5a..56379c3a55 100644 --- a/packages/sheets-plugin-image/tsconfig.json +++ b/packages/sheets-plugin-image/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", "baseUrl": "./", "esModuleInterop": true, "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-import-xlsx/tsconfig.json b/packages/sheets-plugin-import-xlsx/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/sheets-plugin-import-xlsx/tsconfig.json +++ b/packages/sheets-plugin-import-xlsx/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-numfmt/tsconfig.json b/packages/sheets-plugin-numfmt/tsconfig.json index 22e90e4c5a..56379c3a55 100644 --- a/packages/sheets-plugin-numfmt/tsconfig.json +++ b/packages/sheets-plugin-numfmt/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", "baseUrl": "./", "esModuleInterop": true, "strictPropertyInitialization": false diff --git a/packages/sheets-plugin-operation/tsconfig.json b/packages/sheets-plugin-operation/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/sheets-plugin-operation/tsconfig.json +++ b/packages/sheets-plugin-operation/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/ui-plugin-docs/tsconfig.json b/packages/ui-plugin-docs/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/ui-plugin-docs/tsconfig.json +++ b/packages/ui-plugin-docs/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/ui-plugin-sheets/tsconfig.json b/packages/ui-plugin-sheets/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/ui-plugin-sheets/tsconfig.json +++ b/packages/ui-plugin-sheets/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/packages/ui-plugin-slides/tsconfig.json b/packages/ui-plugin-slides/tsconfig.json index 69b5c31f0b..55a9dcacca 100644 --- a/packages/ui-plugin-slides/tsconfig.json +++ b/packages/ui-plugin-slides/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "lib", - "moduleResolution": "Node", //This value is needed for Node.js. "baseUrl": "./", "esModuleInterop": true, // auto allowSyntheticDefaultImports true "strictPropertyInitialization": false diff --git a/tsconfig.json b/tsconfig.json index 893c127c56..3a3c221c86 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "jsx": "react-jsx", "jsxImportSource": "react", "sourceMap": true, + "moduleResolution": "Bundler", "resolveJsonModule": true, "strict": true, "strictPropertyInitialization": true,