Skip to content

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.

style(workspace): eslint

Dushusir85291c403e4a
diff --git a/.eslintignore b/.eslintignore
index f2030cffcb..0cebdb60f1 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,4 +1,5 @@
.eslintrc.js
+.eslintrc
vite.config.ts
**/*.test.js
dist
diff --git a/.eslintrc.back.js b/.eslintrc.back.js
new file mode 100644
index 0000000000..08c49d792c
--- /dev/null
+++ b/.eslintrc.back.js
@@ -0,0 +1,125 @@
+module.exports = {
+ // env: {
+ // browser: true,
+ // es2021: true,
+ // node: true,
+ // jest: true,
+ // },
+ globals: {
+ page: true,
+ browser: true,
+ context: true,
+ jestPuppeteer: true,
+ },
+ // parser: '@typescript-eslint/parser',
+ // extends: ['airbnb-typescript', 'prettier', 'eslint:recommended', 'plugin:import/recommended', 'plugin:import/typescript'],
+ extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
+ env: {
+ browser: true,
+ es2021: true,
+ },
+ parser: '@typescript-eslint/parser',
+ parserOptions: {
+ warnOnUnsupportedTypeScriptVersion: false,
+ ecmaVersion: 12,
+ sourceType: 'module',
+ tsconfigRootDir: __dirname,
+ project: ['./packages/*/tsconfig.json'],
+ },
+ plugins: ['@typescript-eslint', 'prettier', 'import', 'import-newlines', 'unused-imports'],
+ rules: {
+ 'no-cond-assign': 'off',
+ 'no-restricted-globals': 'off',
+ 'prettier/prettier': [
+ 'error',
+ {
+ endOfLine: 'auto',
+ },
+ ],
+ 'import/prefer-default-export': 'off',
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
+ // turn on errors for missing imports
+ 'import/no-unresolved': [2, { ignore: ['\\.less$', '^@'] }],
+ '@typescript-eslint/naming-convention': 'off',
+ '@typescript-eslint/no-use-before-define': 'off',
+ '@typescript-eslint/no-shadow': 'off',
+ 'import/no-cycle': 'off',
+ 'no-param-reassign': 'off',
+ 'no-bitwise': 'off',
+ 'default-case': 'off',
+ 'class-methods-use-this': 'off',
+ 'consistent-return': 'off',
+ 'no-underscore-dangle': 'off',
+ 'no-restricted-syntax': 'off',
+ 'max-classes-per-file': 'off',
+ 'prefer-destructuring': 'off',
+ 'no-plusplus': 'off',
+ 'no-return-assign': 'off',
+ 'no-continue': 'off',
+ 'no-loop-func': 'off',
+ '@typescript-eslint/no-loop-func': 'off',
+ 'guard-for-in': 'off',
+ 'no-prototype-builtins': 'off',
+ 'no-lonely-if': 'off',
+ 'prefer-const': 'off',
+ radix: 'off',
+ 'no-nested-ternary': 'off',
+ 'no-new': 'off',
+ 'no-unused-expressions': 'off',
+ '@typescript-eslint/no-unused-expressions': 'off',
+ 'no-console': 'off',
+ 'no-multi-assign': 'off',
+ 'no-restricted-properties': 'off',
+ 'no-control-regex': 'off',
+ '@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
+ 'no-await-in-loop': 'off',
+ '@typescript-eslint/explicit-member-accessibility': [
+ 'error',
+ {
+ accessibility: 'no-public',
+ },
+ ],
+ '@typescript-eslint/consistent-type-assertions': [
+ 'error',
+ {
+ assertionStyle: 'as',
+ objectLiteralTypeAssertions: 'allow-as-parameter',
+ },
+ ],
+ 'spaced-comment': 'off',
+ eqeqeq: ['error', 'always', { null: 'ignore' }],
+
+ // eslint-plugin-unused-imports
+ '@typescript-eslint/no-unused-vars': 'off',
+ 'unused-imports/no-unused-imports': 'error',
+
+ 'prefer-regex-literals': 'off',
+ '@typescript-eslint/default-param-last': 'off',
+ 'grouped-accessor-pairs': 'off',
+ '@typescript-eslint/member-ordering': 'error',
+ // '@typescript-eslint/member-ordering': [
+ // 'error',
+ // { default: ['private-field', 'protected-field', 'public-field', 'constructor', 'private-method', 'protected-method', 'public-method'] },
+ // ],
+ },
+ settings: {
+ 'import/parsers': {
+ '@typescript-eslint/parser': ['.ts', '.tsx'],
+ },
+ 'import/resolver': {
+ typescript: {
+ // always try to resolve config under `<root>@config`
+ // directory even it doesn't contain any source code,
+ // like `@config/unist`
+ alwaysTryTypes: true,
+ // Choose from one of the "project" configs below or omit
+ // to use <root>/tsconfig.json by default
+ // use <root>/path/to/folder/tsconfig.json
+ project: './tsconfig.json',
+ },
+ node: {
+ extensions: ['.ts', '.tsx'],
+ },
+ },
+ },
+};
diff --git a/.eslintrc.js b/.eslintrc.js
index 9bc06fc639..e4521a27bb 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,125 +1,123 @@
module.exports = {
- // env: {
- // browser: true,
- // es2021: true,
- // node: true,
- // jest: true,
- // },
- globals: {
- page: true,
- browser: true,
- context: true,
- jestPuppeteer: true,
- },
- // parser: '@typescript-eslint/parser',
- // extends: ['airbnb-typescript', 'prettier', 'eslint:recommended', 'plugin:import/recommended', 'plugin:import/typescript'],
- extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
- env: {
- browser: true,
- es2021: true,
- },
- parser: '@typescript-eslint/parser',
- parserOptions: {
- warnOnUnsupportedTypeScriptVersion: false,
- ecmaVersion: 12,
- sourceType: 'module',
- tsconfigRootDir: __dirname,
- project: ['./packages/*/tsconfig.json'],
- },
- plugins: ['@typescript-eslint', 'prettier', 'import', 'import-newlines', 'unused-imports'],
- rules: {
- 'no-cond-assign': 'off',
- 'no-restricted-globals': 'off',
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
- // turn on errors for missing imports
- 'import/no-unresolved': [2, { ignore: ['\\.less$', '^@'] }],
- '@typescript-eslint/naming-convention': 'off',
- '@typescript-eslint/no-use-before-define': 'off',
- '@typescript-eslint/no-shadow': 'off',
- 'import/no-cycle': 'off',
- 'no-param-reassign': 'off',
- 'no-bitwise': 'off',
- 'default-case': 'off',
- 'class-methods-use-this': 'off',
- 'consistent-return': 'off',
- 'no-underscore-dangle': 'off',
- 'no-restricted-syntax': 'off',
- 'max-classes-per-file': 'off',
- 'prefer-destructuring': 'off',
- 'no-plusplus': 'off',
- 'no-return-assign': 'off',
- 'no-continue': 'off',
- 'no-loop-func': 'off',
- '@typescript-eslint/no-loop-func': 'off',
- 'guard-for-in': 'off',
- 'no-prototype-builtins': 'off',
- 'no-lonely-if': 'off',
- 'prefer-const': 'off',
- radix: 'off',
- 'no-nested-ternary': 'off',
- 'no-new': 'off',
- 'no-unused-expressions': 'off',
- '@typescript-eslint/no-unused-expressions': 'off',
- 'no-console': 'off',
- 'no-multi-assign': 'off',
- 'no-restricted-properties': 'off',
- 'no-control-regex': 'off',
- '@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
- 'no-await-in-loop': 'off',
- '@typescript-eslint/explicit-member-accessibility': [
- 'error',
- {
- accessibility: 'no-public',
- },
- ],
- '@typescript-eslint/consistent-type-assertions': [
- 'error',
- {
- assertionStyle: 'as',
- objectLiteralTypeAssertions: 'allow-as-parameter',
- },
- ],
- 'spaced-comment': 'off',
- eqeqeq: ['error', 'always', { null: 'ignore' }],
-
- // eslint-plugin-unused-imports
- '@typescript-eslint/no-unused-vars': 'off',
- 'unused-imports/no-unused-imports': 'error',
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "plugins": [
+ "@typescript-eslint", "prettier", 'import', 'import-newlines', 'unused-imports'
+ ],
+ "extends": [
+ "airbnb-base", // https://www.npmjs.com/package/eslint-config-airbnb-base
+ "airbnb-typescript/base", // https://www.npmjs.com/package/eslint-config-airbnb-typescript
+ // "plugin:@typescript-eslint/recommended",// no need https://typescript-eslint.io/
+ "prettier"
+ ],
+ "parserOptions": {
+ "project": "./tsconfig.json"
+ },
+ rules: {
+ 'no-cond-assign': 'off',
+ 'no-restricted-globals': 'off',
+ 'prettier/prettier': [
+ 'error',
+ {
+ endOfLine: 'auto',
+ },
+ ],
+ 'import/prefer-default-export': 'off',
+ 'import/no-extraneous-dependencies': ['error',
+ {
+ devDependencies: true
+ }
+ ],
+ // turn on errors for missing imports
+ 'import/no-unresolved': [
+ 2,
+ {
+ ignore: ['\\.less$', '^@'
+ ]
+ }
+ ],
+ '@typescript-eslint/naming-convention': 'off',
+ '@typescript-eslint/no-use-before-define': 'off',
+ '@typescript-eslint/no-shadow': 'off',
+ 'import/no-cycle': 'off',
+ 'no-param-reassign': 'off',
+ 'no-bitwise': 'off',
+ 'default-case': 'off',
+ 'class-methods-use-this': 'off',
+ 'consistent-return': 'off',
+ 'no-underscore-dangle': 'off',
+ 'no-restricted-syntax': 'off',
+ 'max-classes-per-file': 'off',
+ 'prefer-destructuring': 'off',
+ 'no-plusplus': 'off',
+ 'no-return-assign': 'off',
+ 'no-continue': 'off',
+ 'no-loop-func': 'off',
+ '@typescript-eslint/no-loop-func': 'off',
+ 'guard-for-in': 'off',
+ 'no-prototype-builtins': 'off',
+ 'no-lonely-if': 'off',
+ 'prefer-const': 'off',
+ radix: 'off',
+ 'no-nested-ternary': 'off',
+ 'no-new': 'off',
+ 'no-unused-expressions': 'off',
+ '@typescript-eslint/no-unused-expressions': 'off',
+ 'no-console': 'off',
+ 'no-multi-assign': 'off',
+ 'no-restricted-properties': 'off',
+ 'no-control-regex': 'off',
+ '@typescript-eslint/array-type': ['error',
+ {
+ default: 'array-simple'
+ }
+ ],
+ 'no-await-in-loop': 'off',
+ '@typescript-eslint/explicit-member-accessibility': [
+ 'error',
+ {
+ accessibility: 'no-public',
+ },
+ ],
+ '@typescript-eslint/consistent-type-assertions': [
+ 'error',
+ {
+ assertionStyle: 'as',
+ objectLiteralTypeAssertions: 'allow-as-parameter',
+ },
+ ],
+ 'spaced-comment': 'off',
+ eqeqeq: ['error', 'always',
+ {
+ null: 'ignore'
+ }
+ ],
+ // eslint-plugin-unused-imports
+ '@typescript-eslint/no-unused-vars': 'off',
+ 'unused-imports/no-unused-imports': 'error',
- 'prefer-regex-literals': 'off',
- '@typescript-eslint/default-param-last': 'off',
- 'grouped-accessor-pairs': 'off',
- '@typescript-eslint/member-ordering': 'error',
- // '@typescript-eslint/member-ordering': [
- // 'error',
- // { default: ['private-field', 'protected-field', 'public-field', 'constructor', 'private-method', 'protected-method', 'public-method'] },
- // ],
+ 'prefer-regex-literals': 'off',
+ '@typescript-eslint/default-param-last': 'off',
+ 'grouped-accessor-pairs': 'off',
+ '@typescript-eslint/member-ordering': 'error',
+ // '@typescript-eslint/member-ordering': [
+ // 'error',
+ // { default: ['private-field', 'protected-field', 'public-field', 'constructor', 'private-method', 'protected-method', 'public-method'] },
+ // ],
+ },
+ // https://www.npmjs.com/package/eslint-import-resolver-typescript
+ settings: {
+ 'import/parsers': {
+ '@typescript-eslint/parser': ['.ts', '.tsx'],
},
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- // always try to resolve config under `<root>@config`
- // directory even it doesn't contain any source code,
- // like `@config/unist`
- alwaysTryTypes: true,
- // Choose from one of the "project" configs below or omit
- // to use <root>/tsconfig.json by default
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- node: {
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
- },
- },
+ 'import/resolver': {
+ typescript: {
+ alwaysTryTypes: true,
+ project: './tsconfig.json',
+ },
+ node: {
+ extensions: ['.ts', '.tsx'],
+ },
},
-};
+ },
+}
\ No newline at end of file
diff --git a/.github/contributing-zh.md b/.github/contributing-zh.md
index ebd18bd6e8..40041868ee 100644
--- a/.github/contributing-zh.md
+++ b/.github/contributing-zh.md
@@ -266,7 +266,7 @@ pnpm install
}
```
-5. 类中的修饰符参照 `@typescript-eslint/member-ordering` 默认的规则进行组织,[详细排序规则](https://typescript-eslint.io/rules/member-ordering/#default-configuration)
+5. 类中的修饰符参照 `@typescript-/member-ordering` 默认的规则进行组织,[详细排序规则](https://typescript-eslint.io/rules/member-ordering/#default-configuration)
6. 当使用 `forEach` 来简化 `for` 循环时,有三点注意:
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 963b462357..d389d53bb0 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,17 +1,12 @@
{
- "prettier.eslintIntegration": true,
- "editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
- "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "javascript.preferences.importModuleSpecifier": "relative",
+ "typescript.preferences.importModuleSpecifier": "relative",
"commentTranslate.targetLanguage": "zh-CN",
- "[html]": {
- "editor.defaultFormatter": "vscode.html-language-features"
- },
"commentTranslate.hover.enabled": true,
"commentTranslate.source": "Google",
-
"cSpell.words": [
"Bandings",
"Catmull",
@@ -68,12 +63,4 @@
"Xingkai",
"Xinwei"
],
- "javascript.preferences.importModuleSpecifier": "relative",
- "typescript.preferences.importModuleSpecifier": "relative",
- "[xml]": {
- "editor.defaultFormatter": "redhat.vscode-xml"
- },
- "[typescript]": {
- "editor.defaultFormatter": "vscode.typescript-language-features"
- }
-}
+}
\ No newline at end of file
diff --git a/cli/src/templates/base/.eslintrc.js b/cli/src/templates/base/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/cli/src/templates/base/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/cli/src/templates/base/.prettierrc.cjs b/cli/src/templates/base/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/cli/src/templates/base/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/cli/src/templates/base/jest.config.js b/cli/src/templates/base/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/cli/src/templates/base/jest.config.js
+++ b/cli/src/templates/base/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/cli/src/templates/base/package.json b/cli/src/templates/base/package.json
index 016a524f46..aae954499a 100644
--- a/cli/src/templates/base/package.json
+++ b/cli/src/templates/base/package.json
@@ -39,14 +39,6 @@
"@vitejs/plugin-legacy": "^1.5.1",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.3.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
diff --git a/cli/src/templates/base/tsconfig.json b/cli/src/templates/base/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/cli/src/templates/base/tsconfig.json
+++ b/cli/src/templates/base/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/cli/src/templates/base/tsconfig.test.json b/cli/src/templates/base/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/cli/src/templates/base/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/cli/src/templates/common-plugin/.eslintrc.js b/cli/src/templates/common-plugin/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/cli/src/templates/common-plugin/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/cli/src/templates/common-plugin/.prettierrc.cjs b/cli/src/templates/common-plugin/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/cli/src/templates/common-plugin/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/cli/src/templates/common-plugin/jest.config.js b/cli/src/templates/common-plugin/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/cli/src/templates/common-plugin/jest.config.js
+++ b/cli/src/templates/common-plugin/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/cli/src/templates/common-plugin/package.json b/cli/src/templates/common-plugin/package.json
index a1a6a9918c..9ea3f38ace 100644
--- a/cli/src/templates/common-plugin/package.json
+++ b/cli/src/templates/common-plugin/package.json
@@ -37,14 +37,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^16.4.6",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
diff --git a/cli/src/templates/common-plugin/tsconfig.json b/cli/src/templates/common-plugin/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/cli/src/templates/common-plugin/tsconfig.json
+++ b/cli/src/templates/common-plugin/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/cli/src/templates/common-plugin/tsconfig.test.json b/cli/src/templates/common-plugin/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/cli/src/templates/common-plugin/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/cli/src/templates/docs-plugin/.eslintrc.js b/cli/src/templates/docs-plugin/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/cli/src/templates/docs-plugin/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/cli/src/templates/docs-plugin/.prettierrc.cjs b/cli/src/templates/docs-plugin/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/cli/src/templates/docs-plugin/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/cli/src/templates/docs-plugin/jest.config.js b/cli/src/templates/docs-plugin/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/cli/src/templates/docs-plugin/jest.config.js
+++ b/cli/src/templates/docs-plugin/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/cli/src/templates/docs-plugin/package.json b/cli/src/templates/docs-plugin/package.json
index 89c2b297e4..f99895c65e 100644
--- a/cli/src/templates/docs-plugin/package.json
+++ b/cli/src/templates/docs-plugin/package.json
@@ -35,14 +35,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^16.4.6",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
diff --git a/cli/src/templates/docs-plugin/tsconfig.json b/cli/src/templates/docs-plugin/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/cli/src/templates/docs-plugin/tsconfig.json
+++ b/cli/src/templates/docs-plugin/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/cli/src/templates/docs-plugin/tsconfig.test.json b/cli/src/templates/docs-plugin/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/cli/src/templates/docs-plugin/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/cli/src/templates/sheets-plugin/.eslintrc.js b/cli/src/templates/sheets-plugin/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/cli/src/templates/sheets-plugin/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/cli/src/templates/sheets-plugin/.prettierrc.cjs b/cli/src/templates/sheets-plugin/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/cli/src/templates/sheets-plugin/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/cli/src/templates/sheets-plugin/jest.config.js b/cli/src/templates/sheets-plugin/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/cli/src/templates/sheets-plugin/jest.config.js
+++ b/cli/src/templates/sheets-plugin/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/cli/src/templates/sheets-plugin/package.json b/cli/src/templates/sheets-plugin/package.json
index d5b6500456..197883b931 100644
--- a/cli/src/templates/sheets-plugin/package.json
+++ b/cli/src/templates/sheets-plugin/package.json
@@ -37,14 +37,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^16.4.6",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
diff --git a/cli/src/templates/sheets-plugin/tsconfig.json b/cli/src/templates/sheets-plugin/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/cli/src/templates/sheets-plugin/tsconfig.json
+++ b/cli/src/templates/sheets-plugin/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/cli/src/templates/sheets-plugin/tsconfig.test.json b/cli/src/templates/sheets-plugin/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/cli/src/templates/sheets-plugin/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/cli/src/templates/slides-plugin/.eslintrc.js b/cli/src/templates/slides-plugin/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/cli/src/templates/slides-plugin/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/cli/src/templates/slides-plugin/.prettierrc.cjs b/cli/src/templates/slides-plugin/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/cli/src/templates/slides-plugin/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/cli/src/templates/slides-plugin/jest.config.js b/cli/src/templates/slides-plugin/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/cli/src/templates/slides-plugin/jest.config.js
+++ b/cli/src/templates/slides-plugin/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/cli/src/templates/slides-plugin/package.json b/cli/src/templates/slides-plugin/package.json
index ce78e03394..a26d48fdf1 100644
--- a/cli/src/templates/slides-plugin/package.json
+++ b/cli/src/templates/slides-plugin/package.json
@@ -37,14 +37,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^16.4.6",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -60,4 +52,4 @@
"@univerjs/base-slides": "workspace:^0.0.1",
"preact": "^10.5.14"
}
-}
+}
\ No newline at end of file
diff --git a/cli/src/templates/slides-plugin/tsconfig.json b/cli/src/templates/slides-plugin/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/cli/src/templates/slides-plugin/tsconfig.json
+++ b/cli/src/templates/slides-plugin/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/cli/src/templates/slides-plugin/tsconfig.test.json b/cli/src/templates/slides-plugin/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/cli/src/templates/slides-plugin/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/examples/univer-doc-ts/.eslintrc.js b/examples/univer-doc-ts/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/examples/univer-doc-ts/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/examples/univer-doc-ts/.prettierrc.js b/examples/univer-doc-ts/.prettierrc.js
deleted file mode 100644
index 001317e0a5..0000000000
--- a/examples/univer-doc-ts/.prettierrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
-};
diff --git a/examples/univer-doc-ts/package.json b/examples/univer-doc-ts/package.json
index d3a00e1e81..e27c6490ff 100644
--- a/examples/univer-doc-ts/package.json
+++ b/examples/univer-doc-ts/package.json
@@ -27,14 +27,6 @@
"@types/node": "^18.14.0",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.3.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest-dev-server": "^6.1.1",
"jest-environment-jsdom": "^29.0.3",
@@ -54,4 +46,4 @@
"@univerjs/core": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/examples/univer-doc-ts/tsconfig.json b/examples/univer-doc-ts/tsconfig.json
index c9a567bad1..ba73bc3562 100644
--- a/examples/univer-doc-ts/tsconfig.json
+++ b/examples/univer-doc-ts/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -16,17 +18,18 @@
"strict": true,
"allowJs": true,
"downlevelIteration": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports true
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"suppressImplicitAnyIndexErrors": true,
"strictPropertyInitialization": false,
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/examples/univer-preact-ts/.eslintrc.js b/examples/univer-preact-ts/.eslintrc.js
deleted file mode 100644
index ab8ce42782..0000000000
--- a/examples/univer-preact-ts/.eslintrc.js
+++ /dev/null
@@ -1,42 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: ['airbnb-typescript', 'prettier', 'eslint:recommended', 'plugin:import/recommended', 'plugin:import/typescript'],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- // project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/examples/univer-preact-ts/.prettierrc.cjs b/examples/univer-preact-ts/.prettierrc.cjs
deleted file mode 100644
index 6604107223..0000000000
--- a/examples/univer-preact-ts/.prettierrc.cjs
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
- printWidth: 180,
-};
diff --git a/examples/univer-preact-ts/jest.config.js b/examples/univer-preact-ts/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/examples/univer-preact-ts/jest.config.js
+++ b/examples/univer-preact-ts/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/examples/univer-preact-ts/package.json b/examples/univer-preact-ts/package.json
index 6cb9096cfd..d3b7563be8 100644
--- a/examples/univer-preact-ts/package.json
+++ b/examples/univer-preact-ts/package.json
@@ -23,14 +23,6 @@
"@types/node": "^18.14.0",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.3.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest-dev-server": "^6.1.1",
"jest-environment-jsdom": "^29.0.3",
@@ -57,4 +49,4 @@
"@univerjs/sheets-plugin-numfmt": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/examples/univer-preact-ts/tsconfig.json b/examples/univer-preact-ts/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/examples/univer-preact-ts/tsconfig.json
+++ b/examples/univer-preact-ts/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/examples/univer-preact-ts/tsconfig.test.json b/examples/univer-preact-ts/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/examples/univer-preact-ts/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/examples/univer-sheet-ts/.eslintrc.js b/examples/univer-sheet-ts/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/examples/univer-sheet-ts/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/examples/univer-sheet-ts/.prettierrc.js b/examples/univer-sheet-ts/.prettierrc.js
deleted file mode 100644
index 001317e0a5..0000000000
--- a/examples/univer-sheet-ts/.prettierrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
-};
diff --git a/examples/univer-sheet-ts/package.json b/examples/univer-sheet-ts/package.json
index 4825d088a4..ed44990cc7 100644
--- a/examples/univer-sheet-ts/package.json
+++ b/examples/univer-sheet-ts/package.json
@@ -29,14 +29,6 @@
"enzyme-adapter-preact-pure": "^3.3.0",
"esbuild": "^0.17.10",
"esbuild-style-plugin": "^1.6.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest-dev-server": "^6.1.1",
"jest-environment-jsdom": "^29.0.3",
@@ -61,4 +53,4 @@
"@univerjs/ui-plugin-sheets": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/examples/univer-sheet-ts/tsconfig.json b/examples/univer-sheet-ts/tsconfig.json
index 620249146d..21492de3a6 100644
--- a/examples/univer-sheet-ts/tsconfig.json
+++ b/examples/univer-sheet-ts/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "commonjs",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -16,13 +18,9 @@
"strict": true,
"allowJs": true,
"downlevelIteration": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports true
- // "jsx": "preserve",
- // "jsxFactory": "h",
- // "jsxFragmentFactory": "Fragment",
"jsx": "react-jsx",
"jsxImportSource": "preact",
"experimentalDecorators": true,
@@ -30,5 +28,9 @@
"suppressImplicitAnyIndexErrors": true,
"strictPropertyInitialization": false,
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)","preact"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)",
+ "preact"
+ ]
+}
\ No newline at end of file
diff --git a/examples/univer-slide-ts/.eslintrc.js b/examples/univer-slide-ts/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/examples/univer-slide-ts/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/examples/univer-slide-ts/.prettierrc.js b/examples/univer-slide-ts/.prettierrc.js
deleted file mode 100644
index 001317e0a5..0000000000
--- a/examples/univer-slide-ts/.prettierrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
-};
diff --git a/examples/univer-slide-ts/package.json b/examples/univer-slide-ts/package.json
index 5639735dac..c8b18c71ca 100644
--- a/examples/univer-slide-ts/package.json
+++ b/examples/univer-slide-ts/package.json
@@ -24,14 +24,6 @@
"@types/node": "^18.14.0",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.3.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest-dev-server": "^6.1.1",
"jest-environment-jsdom": "^29.0.3",
@@ -51,4 +43,4 @@
"@univerjs/core": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/examples/univer-slide-ts/tsconfig.json b/examples/univer-slide-ts/tsconfig.json
index c9a567bad1..ba73bc3562 100644
--- a/examples/univer-slide-ts/tsconfig.json
+++ b/examples/univer-slide-ts/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -16,17 +18,18 @@
"strict": true,
"allowJs": true,
"downlevelIteration": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports true
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"suppressImplicitAnyIndexErrors": true,
"strictPropertyInitialization": false,
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/examples/univer-vanilla-ts/.eslintrc.js b/examples/univer-vanilla-ts/.eslintrc.js
deleted file mode 100644
index 7f4cf3e7ba..0000000000
--- a/examples/univer-vanilla-ts/.eslintrc.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- parser: '@typescript-eslint/parser',
- extends: [
- 'airbnb-typescript',
- 'prettier',
- 'eslint:recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- ],
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- plugins: ['@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- { devDependencies: true },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': 'error',
- },
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true, // always try to resolve config under `<root>@config` directory even it doesn't contain any source code, like `@config/unist`
-
- // Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
-
- // use <root>/path/to/folder/tsconfig.json
- project: './tsconfig.json',
- },
- },
- },
-};
diff --git a/examples/univer-vanilla-ts/.prettierrc.js b/examples/univer-vanilla-ts/.prettierrc.js
deleted file mode 100644
index 001317e0a5..0000000000
--- a/examples/univer-vanilla-ts/.prettierrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- singleQuote: true,
- trailingComma: 'es5',
- tabWidth: 4,
- semi: true,
-};
diff --git a/examples/univer-vanilla-ts/package.json b/examples/univer-vanilla-ts/package.json
index f2924753f1..689a8bb7f9 100644
--- a/examples/univer-vanilla-ts/package.json
+++ b/examples/univer-vanilla-ts/package.json
@@ -24,14 +24,6 @@
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.3.0",
"esbuild": "^0.16.4",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest-dev-server": "^6.1.1",
"jest-environment-jsdom": "^29.0.3",
@@ -58,4 +50,4 @@
"@univerjs/ui-plugin-sheets": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/examples/univer-vanilla-ts/tsconfig.json b/examples/univer-vanilla-ts/tsconfig.json
index c9a567bad1..ba73bc3562 100644
--- a/examples/univer-vanilla-ts/tsconfig.json
+++ b/examples/univer-vanilla-ts/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -16,17 +18,18 @@
"strict": true,
"allowJs": true,
"downlevelIteration": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports true
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"suppressImplicitAnyIndexErrors": true,
"strictPropertyInitialization": false,
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 433a9f402e..879f6d1989 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"test:e2e": "pnpm run --filter @univerjs/base-sheets test:play",
"dev": "node scripts/dev",
"dev:sheet": "pnpm run --filter univer-sheet-ts dev",
- "start:sheet": "eslint && pnpm run --filter univer-sheet-ts start",
+ "start:sheet": "pnpm run --filter univer-sheet-ts start",
"dev:all": "pnpm run --filter univer-vanilla-ts dev",
"dev:preact": "pnpm run --filter univer-sheet-preact dev",
"dev:doc": "pnpm run --filter @univerjs/base-docs dev",
@@ -28,7 +28,9 @@
"postinstall": "node scripts/postinstall.js",
"prepare": "husky install",
"pre-lint": "lint-staged",
- "lint": "eslint ./packages/base-sheets/ --ext .ts"
+ "lint": "eslint ./packages/base-sheets/src --ext .ts,.tsx",
+ "lint-s": "eslint ./packages/base-sheets/src/Controller/Selection/SelectionManager.ts",
+ "lint-and-fix": "eslint ./packages/base-sheets/src/Controller/Selection/SelectionManager.ts --ext .ts,.tsx --fix"
},
"author": "DreamNum <[email protected]>",
"license": "MIT",
@@ -40,21 +42,17 @@
"@types/jest": "28.1.8",
"@types/node": "^18.14.0",
"@types/numeral": "^2.0.2",
- "@typescript-eslint/eslint-plugin": "5.38.1",
- "@typescript-eslint/parser": "5.38.1",
+ "@typescript-eslint/eslint-plugin": "^5.54.0",
+ "@typescript-eslint/parser": "^5.54.0",
"cross-env": "^7.0.3",
- "eslint": "8.22.0",
- "eslint-config-airbnb-base": "15.0.0",
- "eslint-config-airbnb-typescript": "17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-import-resolver-typescript": "^2.7.1",
- "eslint-plugin-import": "2.26.0",
- "eslint-plugin-import-newlines": "1.2.3",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
- "eslint-plugin-unused-imports": "2.0.0",
+ "eslint": "^8.35.0",
+ "eslint-config-airbnb-base": "^15.0.0",
+ "eslint-config-airbnb-typescript": "^17.0.0",
+ "eslint-config-prettier": "^8.6.0",
+ "eslint-import-resolver-typescript": "^3.5.3",
+ "eslint-plugin-import-newlines": "^1.3.1",
+ "eslint-plugin-prettier": "^4.2.1",
+ "eslint-plugin-unused-imports": "^2.0.0",
"execa": "^4.1.0",
"find-process": "^1.4.7",
"husky": "^8.0.1",
diff --git a/packages/base-docs/jest.config.js b/packages/base-docs/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/base-docs/jest.config.js
+++ b/packages/base-docs/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/base-docs/package.json b/packages/base-docs/package.json
index 71aa3f5bd9..f58271e37b 100644
--- a/packages/base-docs/package.json
+++ b/packages/base-docs/package.json
@@ -36,14 +36,6 @@
"@testing-library/preact": "^2.0.1",
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -60,4 +52,4 @@
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/base-docs/tsconfig.json b/packages/base-docs/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/base-docs/tsconfig.json
+++ b/packages/base-docs/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-docs/tsconfig.test.json b/packages/base-docs/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-docs/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/base-formula-engine/jest.config.js b/packages/base-formula-engine/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/base-formula-engine/jest.config.js
+++ b/packages/base-formula-engine/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/base-formula-engine/package.json b/packages/base-formula-engine/package.json
index 0af2676e97..27f4c85c61 100644
--- a/packages/base-formula-engine/package.json
+++ b/packages/base-formula-engine/package.json
@@ -36,14 +36,6 @@
"@testing-library/preact": "^2.0.1",
"@types/jest": "^27.5.2",
"@types/node": "^18.14.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"jest-environment-jsdom": "^29.0.3",
"less": "^4.1.1",
"prettier": "^2.3.2",
@@ -56,4 +48,4 @@
"@univerjs/core": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/base-formula-engine/tsconfig.json b/packages/base-formula-engine/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/base-formula-engine/tsconfig.json
+++ b/packages/base-formula-engine/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-formula-engine/tsconfig.test.json b/packages/base-formula-engine/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-formula-engine/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/base-numfmt-engine/tsconfig.json b/packages/base-numfmt-engine/tsconfig.json
index ce348d88a1..f9f2840cfe 100644
--- a/packages/base-numfmt-engine/tsconfig.json
+++ b/packages/base-numfmt-engine/tsconfig.json
@@ -3,27 +3,34 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node",
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
"sourceMap": true,
"resolveJsonModule": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true,
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
- "types": ["jest", "node", "@types/jest"]
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-numfmt-engine/tsconfig.test.json b/packages/base-numfmt-engine/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-numfmt-engine/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/base-render/jest.config.js b/packages/base-render/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/base-render/jest.config.js
+++ b/packages/base-render/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/base-render/tsconfig.json b/packages/base-render/tsconfig.json
index 99393c39c5..19b7b8a41e 100644
--- a/packages/base-render/tsconfig.json
+++ b/packages/base-render/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,7 +17,6 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
// "paths": {
// "@*": ["src/*"]
@@ -24,11 +25,17 @@
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-render/tsconfig.test.json b/packages/base-render/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-render/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/base-sheets/jest.config.js b/packages/base-sheets/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/base-sheets/jest.config.js
+++ b/packages/base-sheets/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/base-sheets/tsconfig.json b/packages/base-sheets/tsconfig.json
index 0d0b125dfa..e49f9058bc 100644
--- a/packages/base-sheets/tsconfig.json
+++ b/packages/base-sheets/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,19 +17,23 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"paths": {
- "@*": ["src/*"]
+ "@*": [
+ "src/*"
+ ]
},
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
}
-}
+}
\ No newline at end of file
diff --git a/packages/base-slides/jest.config.js b/packages/base-slides/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/base-slides/jest.config.js
+++ b/packages/base-slides/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/base-slides/package.json b/packages/base-slides/package.json
index 5c6f3fb6ba..61bfb89662 100644
--- a/packages/base-slides/package.json
+++ b/packages/base-slides/package.json
@@ -36,14 +36,6 @@
"@testing-library/preact": "^2.0.1",
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -60,4 +52,4 @@
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/base-slides/tsconfig.json b/packages/base-slides/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/base-slides/tsconfig.json
+++ b/packages/base-slides/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-slides/tsconfig.test.json b/packages/base-slides/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-slides/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/base-ui/tsconfig.json b/packages/base-ui/tsconfig.json
index ab1b56129c..7adb8206e7 100644
--- a/packages/base-ui/tsconfig.json
+++ b/packages/base-ui/tsconfig.json
@@ -3,11 +3,14 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker", "dom.iterable"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker",
+ "dom.iterable"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,19 +18,23 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- // "jsx": "preserve",
- // "jsxFactory": "h",
- // "jsxFragmentFactory": "Fragment",
"jsx": "react-jsx",
"jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)","preact"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)",
+ "preact"
+ ]
+}
\ No newline at end of file
diff --git a/packages/base-ui/tsconfig.test.json b/packages/base-ui/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/base-ui/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/common-plugin-collaboration/jest.config.js b/packages/common-plugin-collaboration/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/common-plugin-collaboration/jest.config.js
+++ b/packages/common-plugin-collaboration/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/common-plugin-collaboration/package.json b/packages/common-plugin-collaboration/package.json
index 26d3521f8a..a04be43d08 100644
--- a/packages/common-plugin-collaboration/package.json
+++ b/packages/common-plugin-collaboration/package.json
@@ -37,14 +37,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -62,4 +54,4 @@
"@univerjs/core": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/common-plugin-collaboration/tsconfig.json b/packages/common-plugin-collaboration/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/common-plugin-collaboration/tsconfig.json
+++ b/packages/common-plugin-collaboration/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/common-plugin-collaboration/tsconfig.test.json b/packages/common-plugin-collaboration/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/common-plugin-collaboration/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/common-plugin-data/package.json b/packages/common-plugin-data/package.json
index 924f113733..e9f6ee16e4 100644
--- a/packages/common-plugin-data/package.json
+++ b/packages/common-plugin-data/package.json
@@ -44,8 +44,6 @@
"devDependencies": {
"@types/jest": "^27.5.2",
"@types/node": "^18.14.0",
- "@typescript-eslint/eslint-plugin": "^4.28.5",
- "@typescript-eslint/parser": "^4.28.5",
"jest": "29.0.0",
"jest-dev-server": "^6.1.1",
"ts-jest": "29.0.1",
@@ -54,4 +52,4 @@
"vite": "^2.4.4",
"vite-plugin-external": "1.2.3"
}
-}
+}
\ No newline at end of file
diff --git a/packages/core/package.json b/packages/core/package.json
index e465b73d34..a1dd011268 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -65,8 +65,6 @@
"devDependencies": {
"@types/jest": "^28.1.8",
"@types/node": "^18.14.0",
- "@typescript-eslint/eslint-plugin": "^5.34.0",
- "@typescript-eslint/parser": "^5.34.0",
"debug": "^4.3.4",
"jest": "29.0.0",
"jest-dev-server": "^6.1.1",
diff --git a/packages/sheets-plugin-alternating-colors/jest.config.js b/packages/sheets-plugin-alternating-colors/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-alternating-colors/jest.config.js
+++ b/packages/sheets-plugin-alternating-colors/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-alternating-colors/tsconfig.json b/packages/sheets-plugin-alternating-colors/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-alternating-colors/tsconfig.json
+++ b/packages/sheets-plugin-alternating-colors/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-alternating-colors/tsconfig.test.json b/packages/sheets-plugin-alternating-colors/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-alternating-colors/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-clipboard/tsconfig.json b/packages/sheets-plugin-clipboard/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-clipboard/tsconfig.json
+++ b/packages/sheets-plugin-clipboard/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-clipboard/tsconfig.test.json b/packages/sheets-plugin-clipboard/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-clipboard/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-comment/jest.config.js b/packages/sheets-plugin-comment/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-comment/jest.config.js
+++ b/packages/sheets-plugin-comment/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-comment/tsconfig.json b/packages/sheets-plugin-comment/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-comment/tsconfig.json
+++ b/packages/sheets-plugin-comment/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-comment/tsconfig.test.json b/packages/sheets-plugin-comment/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-comment/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-conditional-format/jest.config.js b/packages/sheets-plugin-conditional-format/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-conditional-format/jest.config.js
+++ b/packages/sheets-plugin-conditional-format/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-conditional-format/tsconfig.json b/packages/sheets-plugin-conditional-format/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-conditional-format/tsconfig.json
+++ b/packages/sheets-plugin-conditional-format/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-conditional-format/tsconfig.test.json b/packages/sheets-plugin-conditional-format/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-conditional-format/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-data-validation/jest.config.js b/packages/sheets-plugin-data-validation/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-data-validation/jest.config.js
+++ b/packages/sheets-plugin-data-validation/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-data-validation/tsconfig.json b/packages/sheets-plugin-data-validation/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-data-validation/tsconfig.json
+++ b/packages/sheets-plugin-data-validation/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-data-validation/tsconfig.test.json b/packages/sheets-plugin-data-validation/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-data-validation/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-filter/tsconfig.json b/packages/sheets-plugin-filter/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-filter/tsconfig.json
+++ b/packages/sheets-plugin-filter/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-filter/tsconfig.test.json b/packages/sheets-plugin-filter/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-filter/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-find/tsconfig.json b/packages/sheets-plugin-find/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-find/tsconfig.json
+++ b/packages/sheets-plugin-find/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-find/tsconfig.test.json b/packages/sheets-plugin-find/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-find/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-formula/jest.config.js b/packages/sheets-plugin-formula/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-formula/jest.config.js
+++ b/packages/sheets-plugin-formula/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-formula/tsconfig.json b/packages/sheets-plugin-formula/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-formula/tsconfig.json
+++ b/packages/sheets-plugin-formula/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-formula/tsconfig.test.json b/packages/sheets-plugin-formula/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-formula/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-freeze/jest.config.js b/packages/sheets-plugin-freeze/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-freeze/jest.config.js
+++ b/packages/sheets-plugin-freeze/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-freeze/tsconfig.json b/packages/sheets-plugin-freeze/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-freeze/tsconfig.json
+++ b/packages/sheets-plugin-freeze/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-freeze/tsconfig.test.json b/packages/sheets-plugin-freeze/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-freeze/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-group/jest.config.js b/packages/sheets-plugin-group/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-group/jest.config.js
+++ b/packages/sheets-plugin-group/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-group/package.json b/packages/sheets-plugin-group/package.json
index 7aa26b3000..9198260049 100644
--- a/packages/sheets-plugin-group/package.json
+++ b/packages/sheets-plugin-group/package.json
@@ -36,14 +36,6 @@
"@testing-library/preact": "^2.0.1",
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -59,4 +51,4 @@
"@univerjs/core": "workspace:^0.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-group/tsconfig.json b/packages/sheets-plugin-group/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-group/tsconfig.json
+++ b/packages/sheets-plugin-group/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-group/tsconfig.test.json b/packages/sheets-plugin-group/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-group/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-image/jest.config.js b/packages/sheets-plugin-image/jest.config.js
index 9122fca92b..8ae70679c5 100644
--- a/packages/sheets-plugin-image/jest.config.js
+++ b/packages/sheets-plugin-image/jest.config.js
@@ -4,7 +4,7 @@ module.exports = {
preset: 'ts-jest',
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
moduleFileExtensions: ['js', 'ts', 'tsx'],
diff --git a/packages/sheets-plugin-image/tsconfig.json b/packages/sheets-plugin-image/tsconfig.json
index 975f6f388a..cd2560e992 100644
--- a/packages/sheets-plugin-image/tsconfig.json
+++ b/packages/sheets-plugin-image/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node",
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true,
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-image/tsconfig.test.json b/packages/sheets-plugin-image/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-image/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-import-xlsx/jest.config.js b/packages/sheets-plugin-import-xlsx/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-import-xlsx/jest.config.js
+++ b/packages/sheets-plugin-import-xlsx/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-import-xlsx/package.json b/packages/sheets-plugin-import-xlsx/package.json
index c81b886169..4b96d77386 100644
--- a/packages/sheets-plugin-import-xlsx/package.json
+++ b/packages/sheets-plugin-import-xlsx/package.json
@@ -36,14 +36,6 @@
"@testing-library/preact": "^2.0.1",
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -60,4 +52,4 @@
"luckyexcel": "^1.0.1",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-import-xlsx/tsconfig.json b/packages/sheets-plugin-import-xlsx/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-import-xlsx/tsconfig.json
+++ b/packages/sheets-plugin-import-xlsx/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-import-xlsx/tsconfig.test.json b/packages/sheets-plugin-import-xlsx/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-import-xlsx/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-link/jest.config.js b/packages/sheets-plugin-link/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-link/jest.config.js
+++ b/packages/sheets-plugin-link/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-link/tsconfig.json b/packages/sheets-plugin-link/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-link/tsconfig.json
+++ b/packages/sheets-plugin-link/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-link/tsconfig.test.json b/packages/sheets-plugin-link/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-link/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-numfmt/jest.config.js b/packages/sheets-plugin-numfmt/jest.config.js
index 9122fca92b..8ae70679c5 100644
--- a/packages/sheets-plugin-numfmt/jest.config.js
+++ b/packages/sheets-plugin-numfmt/jest.config.js
@@ -4,7 +4,7 @@ module.exports = {
preset: 'ts-jest',
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
moduleFileExtensions: ['js', 'ts', 'tsx'],
diff --git a/packages/sheets-plugin-numfmt/tsconfig.json b/packages/sheets-plugin-numfmt/tsconfig.json
index 975f6f388a..cd2560e992 100644
--- a/packages/sheets-plugin-numfmt/tsconfig.json
+++ b/packages/sheets-plugin-numfmt/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node",
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true,
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-numfmt/tsconfig.test.json b/packages/sheets-plugin-numfmt/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-numfmt/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-pivot-table/jest.config.js b/packages/sheets-plugin-pivot-table/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-pivot-table/jest.config.js
+++ b/packages/sheets-plugin-pivot-table/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-pivot-table/tsconfig.json b/packages/sheets-plugin-pivot-table/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-pivot-table/tsconfig.json
+++ b/packages/sheets-plugin-pivot-table/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-pivot-table/tsconfig.test.json b/packages/sheets-plugin-pivot-table/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-pivot-table/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-print/jest.config.js b/packages/sheets-plugin-print/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-print/jest.config.js
+++ b/packages/sheets-plugin-print/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-print/tsconfig.json b/packages/sheets-plugin-print/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-print/tsconfig.json
+++ b/packages/sheets-plugin-print/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-print/tsconfig.test.json b/packages/sheets-plugin-print/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-print/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-protection/jest.config.js b/packages/sheets-plugin-protection/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-protection/jest.config.js
+++ b/packages/sheets-plugin-protection/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-protection/tsconfig.json b/packages/sheets-plugin-protection/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-protection/tsconfig.json
+++ b/packages/sheets-plugin-protection/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-protection/tsconfig.test.json b/packages/sheets-plugin-protection/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-protection/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-screenshot/jest.config.js b/packages/sheets-plugin-screenshot/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-screenshot/jest.config.js
+++ b/packages/sheets-plugin-screenshot/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-screenshot/tsconfig.json b/packages/sheets-plugin-screenshot/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-screenshot/tsconfig.json
+++ b/packages/sheets-plugin-screenshot/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-screenshot/tsconfig.test.json b/packages/sheets-plugin-screenshot/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-screenshot/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-sort/jest.config.js b/packages/sheets-plugin-sort/jest.config.js
index 2963aca0bf..93bcfd6e89 100644
--- a/packages/sheets-plugin-sort/jest.config.js
+++ b/packages/sheets-plugin-sort/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
unmockedModulePathPatterns: ['node_modules/preact/', 'node_modules/enzyme/'],
diff --git a/packages/sheets-plugin-sort/tsconfig.json b/packages/sheets-plugin-sort/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-sort/tsconfig.json
+++ b/packages/sheets-plugin-sort/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-sort/tsconfig.test.json b/packages/sheets-plugin-sort/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-sort/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/sheets-plugin-split-column/jest.config.js b/packages/sheets-plugin-split-column/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/sheets-plugin-split-column/jest.config.js
+++ b/packages/sheets-plugin-split-column/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/sheets-plugin-split-column/tsconfig.json b/packages/sheets-plugin-split-column/tsconfig.json
index fc81cbd47e..7d1f34cc0a 100644
--- a/packages/sheets-plugin-split-column/tsconfig.json
+++ b/packages/sheets-plugin-split-column/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,17 +17,22 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- "jsx": "preserve",
- "jsxFactory": "h",
- "jsxFragmentFactory": "Fragment",
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)"
+ ]
+}
\ No newline at end of file
diff --git a/packages/sheets-plugin-split-column/tsconfig.test.json b/packages/sheets-plugin-split-column/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/sheets-plugin-split-column/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/packages/ui-plugin-sheets/jest.config.js b/packages/ui-plugin-sheets/jest.config.js
index 73ef4bae42..a1ab72c760 100644
--- a/packages/ui-plugin-sheets/jest.config.js
+++ b/packages/ui-plugin-sheets/jest.config.js
@@ -12,7 +12,7 @@ module.exports = {
},
globals: {
'ts-jest': {
- tsConfig: 'tsconfig.test.json',
+ tsConfig: 'tsconfig.json',
},
},
};
diff --git a/packages/ui-plugin-sheets/package.json b/packages/ui-plugin-sheets/package.json
index 59f3be19b5..257002dfac 100644
--- a/packages/ui-plugin-sheets/package.json
+++ b/packages/ui-plugin-sheets/package.json
@@ -49,14 +49,6 @@
"@types/jest": "^27.0.1",
"@types/node": "^18.14.0",
"@vitejs/plugin-legacy": "^1.5.1",
- "eslint": "^8.22.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-react": "^7.28.0",
- "eslint-plugin-react-hooks": "^4.3.0",
"less": "^4.1.1",
"prettier": "^2.3.2",
"ts-jest": "29.0.1",
@@ -72,4 +64,4 @@
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.12.1"
}
-}
+}
\ No newline at end of file
diff --git a/packages/ui-plugin-sheets/tsconfig.json b/packages/ui-plugin-sheets/tsconfig.json
index 0caf4189bc..3d06479134 100644
--- a/packages/ui-plugin-sheets/tsconfig.json
+++ b/packages/ui-plugin-sheets/tsconfig.json
@@ -3,11 +3,13 @@
"rootDir": "./",
"outDir": "lib",
"target": "ESNext",
-
- "lib": ["ESNext", "DOM", "WebWorker"],
+ "lib": [
+ "ESNext",
+ "DOM",
+ "WebWorker"
+ ],
"module": "ESNext",
"moduleResolution": "Node", //This value is needed for Node.js.
-
"declaration": true,
"declarationDir": "./lib",
"declarationMap": true,
@@ -15,19 +17,23 @@
"resolveJsonModule": true,
"strict": true,
"allowJs": true,
-
"baseUrl": "./",
"skipLibCheck": true,
"esModuleInterop": true, // auto allowSyntheticDefaultImports tru
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
- // "jsx": "preserve",
- // "jsxFactory": "h",
- // "jsxFragmentFactory": "Fragment",
"jsx": "react-jsx",
"jsxImportSource": "preact",
"strictPropertyInitialization": false,
- "types": ["jest", "node", "@types/jest"]
+ "types": [
+ "jest",
+ "node",
+ "@types/jest"
+ ]
},
- "include": ["src/**/*", "test/**/*.test.(ts|tsx|js)", "preact"]
-}
+ "include": [
+ "src/**/*",
+ "test/**/*.test.(ts|tsx|js)",
+ "preact"
+ ]
+}
\ No newline at end of file
diff --git a/packages/ui-plugin-sheets/tsconfig.test.json b/packages/ui-plugin-sheets/tsconfig.test.json
deleted file mode 100644
index a2ac02c4ae..0000000000
--- a/packages/ui-plugin-sheets/tsconfig.test.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- }
-}
diff --git a/tsconfig.json b/tsconfig.json
index 89f6ee2a10..59cb9d44d4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,26 +1,5 @@
{
- "files": [],
- "compilerOptions": {
- "downlevelIteration": true
- },
- "include": [],
- "exclude": [],
- "references": [
- { "path": "./packages/core/tsconfig.ref.json" },
- { "path": "./packages/base-render/tsconfig.ref.json" },
- { "path": "./packages/base-ui/tsconfig.ref.json" },
- { "path": "./packages/base-formula-engine/tsconfig.ref.json" },
- { "path": "./packages/base-numfmt-engine/tsconfig.ref.json" },
- { "path": "./packages/base-sheets/tsconfig.ref.json" },
- { "path": "./packages/base-docs/tsconfig.ref.json" },
- { "path": "./packages/base-slides/tsconfig.ref.json" },
- { "path": "./packages/sheets-plugin-sort/tsconfig.ref.json" },
- { "path": "./packages/sheets-plugin-filter/tsconfig.ref.json" },
- { "path": "./packages/sheets-plugin-find/tsconfig.ref.json" },
- { "path": "./packages/sheets-plugin-numfmt/tsconfig.ref.json" },
- { "path": "./packages/sheets-plugin-import-xlsx/tsconfig.ref.json" },
- { "path": "./packages/common-plugin-register/tsconfig.ref.json" },
- { "path": "./packages/common-plugin-clipboard/tsconfig.ref.json" },
- { "path": "./packages/common-plugin-clipboard-office/tsconfig.ref.json" }
+ "include": [
+ "packages/*/src",
]
}