Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
ci: support eslint & type checking (#142)
白熱6a0adc99bc7c
diff --git a/.github/workflows/test.yml b/.github/workflows/ci-test.ymlsimilarity index 72%rename from .github/workflows/test.ymlrename to .github/workflows/ci-test.ymlindex 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 dependenciesrun: pnpm install- - name: Testing+ - name: 🩺 Run Testrun: pnpm run test++ - name: 🌡️ Run ESLint+ run: pnpm run lint++ - name: 🧼 Type checking+ run: npx tsc --noEmitdiff --git a/examples/univer-doc-ts/tsconfig.json b/examples/univer-doc-ts/tsconfig.jsonindex 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 truediff --git a/examples/univer-sheet-ts/tsconfig.json b/examples/univer-sheet-ts/tsconfig.jsonindex 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 truediff --git a/examples/univer-slide-ts/tsconfig.json b/examples/univer-slide-ts/tsconfig.jsonindex 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 truediff --git a/examples/univer-vanilla-ts/tsconfig.json b/examples/univer-vanilla-ts/tsconfig.jsonindex 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 truediff --git a/packages/base-docs/tsconfig.json b/packages/base-docs/tsconfig.jsonindex 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": falsediff --git a/packages/base-formula-engine/tsconfig.json b/packages/base-formula-engine/tsconfig.jsonindex 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": falsediff --git a/packages/base-numfmt-engine/tsconfig.json b/packages/base-numfmt-engine/tsconfig.jsonindex 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.jsonindex 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.jsonindex 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.jsonindex 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": falsediff --git a/packages/base-ui/tsconfig.json b/packages/base-ui/tsconfig.jsonindex 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.jsonindex 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.jsonindex 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 truediff --git a/packages/sheets-plugin-filter/tsconfig.json b/packages/sheets-plugin-filter/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-find/tsconfig.json b/packages/sheets-plugin-find/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-formula/tsconfig.json b/packages/sheets-plugin-formula/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-image/tsconfig.json b/packages/sheets-plugin-image/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-import-xlsx/tsconfig.json b/packages/sheets-plugin-import-xlsx/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-numfmt/tsconfig.json b/packages/sheets-plugin-numfmt/tsconfig.jsonindex 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": falsediff --git a/packages/sheets-plugin-operation/tsconfig.json b/packages/sheets-plugin-operation/tsconfig.jsonindex 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": falsediff --git a/packages/ui-plugin-docs/tsconfig.json b/packages/ui-plugin-docs/tsconfig.jsonindex 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": falsediff --git a/packages/ui-plugin-sheets/tsconfig.json b/packages/ui-plugin-sheets/tsconfig.jsonindex 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": falsediff --git a/packages/ui-plugin-slides/tsconfig.json b/packages/ui-plugin-slides/tsconfig.jsonindex 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": falsediff --git a/tsconfig.json b/tsconfig.jsonindex 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,