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.

chore: migrate to eslint 8+ (#1235)

白熱ee85ccbef969
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 67d9e9a865..0000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,39 +0,0 @@
-# Build
-dist
-lib
-local
-.turbo
-
-# Coverage
-coverage-report/
-
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Dependency directories
-node_modules
-
-# TypeScript cache
-*.tsbuildinfo
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# dotenv environment variables file
-.env
-.env.test
-
-.cache/
-
-# yarn v2
-.yarn
-
-# Vite
-vite-env.d.ts
\ No newline at end of file
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index 6026e4c3dd..0000000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,193 +0,0 @@
-const { resolve } = require('node:path');
-const tsConfig = require('./tsconfig.json');
-
-/**
- * @type {import('eslint').Linter.Config}
- */
-const config = {
- root: true,
- env: {
- browser: true,
- es2021: true,
- },
- parser: '@typescript-eslint/parser',
- plugins: [
- '@typescript-eslint',
- 'prettier',
- 'import',
- 'import-newlines',
- 'unused-imports',
- 'simple-import-sort',
- 'react',
- 'header',
- ],
- 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/
- 'plugin:prettier/recommended',
- 'prettier',
- ],
- rules: {
- 'header/header': [
- 2,
- 'block',
- [
- '*',
- ' * Copyright 2023-present DreamNum Inc.',
- ' *',
- ' * Licensed under the Apache License, Version 2.0 (the "License");',
- ' * you may not use this file except in compliance with the License.',
- ' * You may obtain a copy of the License at',
- ' *',
- ' * http://www.apache.org/licenses/LICENSE-2.0',
- ' *',
- ' * Unless required by applicable law or agreed to in writing, software',
- ' * distributed under the License is distributed on an "AS IS" BASIS,',
- ' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
- ' * See the License for the specific language governing permissions and',
- ' * limitations under the License.',
- ' ',
- ],
- 2,
- ],
- 'no-cond-assign': 'off',
- 'no-restricted-globals': 'off',
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': [
- 'error',
- {
- devDependencies: true,
- },
- ],
- // turn on errors for missing imports
- 'import/no-unresolved': [
- 2,
- {
- ignore: ['\\.less$', '^@'],
- },
- ],
- 'import/no-cycle': 'warn',
- '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/naming-convention': [
- 'warn',
- // Interfaces' names should start with a capital 'I'.
- {
- selector: 'interface',
- format: ['PascalCase'],
- custom: {
- regex: '^I[A-Z0-9]',
- match: true,
- },
- },
- // Private fields of a class should start with an underscore '_'.
- {
- selector: ['classMethod', 'classProperty'],
- modifiers: ['private'],
- format: ['camelCase'],
- leadingUnderscore: 'require',
- },
- ],
- '@typescript-eslint/no-use-before-define': 'off',
- '@typescript-eslint/no-shadow': 'off',
- '@typescript-eslint/no-loop-func': 'off',
- '@typescript-eslint/no-unused-expressions': 'off',
- 'guard-for-in': 'off',
- 'no-prototype-builtins': 'off',
- 'no-lonely-if': 'off',
- radix: 'off',
- 'no-nested-ternary': 'off',
- 'no-new': 'off',
- 'no-unused-expressions': 'off',
- 'no-console': ['error', { allow: ["warn", "error"] }],
- 'no-multi-assign': 'off',
- 'no-restricted-properties': 'off',
- 'no-control-regex': 'off',
- 'no-await-in-loop': 'off',
- '@typescript-eslint/array-type': [
- 'error',
- {
- default: 'array-simple',
- },
- ],
- '@typescript-eslint/explicit-member-accessibility': [
- 'error',
- {
- accessibility: 'no-public',
- },
- ],
- 'spaced-comment': 'off',
- eqeqeq: [
- 'error',
- 'always',
- {
- null: 'ignore',
- },
- ],
- // eslint-plugin-unused-imports
- '@typescript-eslint/consistent-type-assertions': 'off',
- '@typescript-eslint/default-param-last': 'off',
- '@typescript-eslint/lines-between-class-members': [
- 'warn',
- { enforce: [{ blankLine: 'always', prev: '*', next: 'method' }] },
- { exceptAfterSingleLine: true },
- ],
- // '@typescript-eslint/member-ordering': 'error',
- '@typescript-eslint/no-explicit-any': 'warn',
- '@typescript-eslint/no-redeclare': 'off', // dependency interface and dependency token share the same name
- '@typescript-eslint/no-unused-vars': 'warn',
- 'grouped-accessor-pairs': 'off',
- 'no-magic-numbers': ['warn', { ignore: [0, 1, -1, 2] }],
- 'no-unsafe-optional-chaining': 'off',
- 'prefer-regex-literals': 'off',
- 'simple-import-sort/exports': 'error',
- 'simple-import-sort/imports': 'error',
- 'unused-imports/no-unused-imports': 'error',
- '@typescript-eslint/consistent-type-definitions': ['warn'],
- '@typescript-eslint/consistent-type-imports': ['warn'],
- 'react/self-closing-comp': [
- 'error',
- {
- component: true,
- },
- ],
- },
- // https://www.npmjs.com/package/eslint-import-resolver-typescript
- settings: {
- 'import/parsers': {
- '@typescript-eslint/parser': ['.ts', '.tsx'],
- },
- 'import/resolver': {
- typescript: {
- alwaysTryTypes: true,
- project: './tsconfig.json',
- },
- node: {
- extensions: ['.ts', '.tsx'],
- },
- },
- },
-
- overrides: [
- ...tsConfig.references.map(({ path }) => ({
- files: [`${path}/src/**/*.ts`, `${path}/src/**/*.tsx`],
- parserOptions: {
- project: resolve(__dirname, './tsconfig.eslint.json'),
- },
- })),
- ],
-};
-
-module.exports = config;
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 1aeed23d28..8e27677f68 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -13,4 +13,4 @@ close #
<!-- A description of the proposed changes. -->
-<!-- How to test them. -->
\ No newline at end of file
+<!-- How to test them. -->
diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml
index c1bc746a4c..377143a8a2 100644
--- a/.github/workflows/check-pr.yml
+++ b/.github/workflows/check-pr.yml
@@ -1,22 +1,23 @@
name: 📌 Check PR
on:
- pull_request:
- types:
- - opened
- - edited
- - synchronize
+ pull_request:
+ types:
+ - opened
+ - edited
+ - synchronize
permissions:
- pull-requests: read
+ pull-requests: read
jobs:
- validate:
- name: validate PR title
- runs-on: ubuntu-latest
- steps:
- - uses: amannn/action-semantic-pull-request@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- subjectPattern: ^(?![A-Z]).+$
+ validate:
+ name: validate PR title
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: amannn/action-semantic-pull-request@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ subjectPattern: ^(?![A-Z]).+$
diff --git a/.github/workflows/issue-translator.yml b/.github/workflows/issue-translator.yml
index b81e7c90dc..6ab8b02605 100644
--- a/.github/workflows/issue-translator.yml
+++ b/.github/workflows/issue-translator.yml
@@ -1,12 +1,14 @@
name: 🌍 Issues Translator
+
on:
- issue_comment:
- types: [created]
- issues:
- types: [opened]
+ issue_comment:
+ types: [created]
+ issues:
+ types: [opened]
jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: usthe/[email protected]
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: usthe/[email protected]
diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml
index f569edd123..b058bfb4c2 100644
--- a/.github/workflows/preview-deploy.yml
+++ b/.github/workflows/preview-deploy.yml
@@ -2,7 +2,7 @@ name: 📤 Preview Deploy
on:
workflow_run:
- workflows: ['📦 Build']
+ workflows: [📦 Build]
types: [completed]
permissions:
@@ -133,7 +133,7 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
- vercel-args: '--prod'
+ vercel-args: --prod
- name: 🚀 Deploy to Vercel (demo)
uses: amondnet/vercel-action@v25
diff --git a/.prettierrc b/.prettierrc
deleted file mode 100644
index 5d43401e1f..0000000000
--- a/.prettierrc
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "printWidth": 120,
- "semi": true,
- "singleQuote": true,
- "tabWidth": 4,
- "trailingComma": "es5",
- "endOfLine": "auto"
-}
diff --git a/.storybook/main.ts b/.storybook/main.ts
index d2343409b1..2dcef95222 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,5 +1,21 @@
-import { type StorybookConfig } from 'storybook';
-import { join, dirname } from 'path';
+/**
+ * Copyright 2023-present DreamNum Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { dirname, join } from 'node:path';
+import type { StorybookConfig } from '@storybook/react-vite';
/**
* This function is used to resolve the absolute path of a package.
@@ -14,22 +30,22 @@ const config: StorybookConfig = {
{
directory: '../packages/design/src/**',
files: '*.stories.@(js|jsx|mjs|ts|tsx)',
- titlePrefix: 'Design'
+ titlePrefix: 'Design',
},
{
directory: '../packages/ui/src/**',
files: '*.stories.@(js|jsx|mjs|ts|tsx)',
- titlePrefix: 'Base UI'
+ titlePrefix: 'Base UI',
},
{
directory: '../packages/sheets-numfmt/src/**',
files: '*.stories.@(js|jsx|mjs|ts|tsx)',
- titlePrefix: 'Numfmt'
+ titlePrefix: 'Numfmt',
},
{
directory: '../packages/find-replace/src/**',
files: '*.stories.@(js|jsx|mjs|ts|tsx)',
- titlePrefix: 'Find & Replace'
+ titlePrefix: 'Find & Replace',
},
],
addons: [
@@ -39,18 +55,18 @@ const config: StorybookConfig = {
getAbsolutePath('@storybook/addon-docs'),
],
framework: {
- name: getAbsolutePath('@storybook/react-vite'),
+ name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: true,
},
- async viteFinal(config, options) {
+ async viteFinal(config) {
config.css = {
modules: {
localsConvention: 'camelCaseOnly',
generateScopedName: 'univer-[local]',
- }
+ },
};
return config;
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 81736d6552..9c586a4f1f 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,11 +1,27 @@
+/**
+ * Copyright 2023-present DreamNum Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import React from 'react';
-import { type Preview } from '@storybook/react';
+import type { Preview } from '@storybook/react';
import { defaultTheme, greenTheme, themeInstance } from '@univerjs/design';
export const themes: Record<string, Record<string, string>> = {
default: defaultTheme,
- green: greenTheme
-}
+ green: greenTheme,
+};
const preview: Preview = {
parameters: {
@@ -36,8 +52,8 @@ const preview: Preview = {
return (
<Story />
- )
- }]
+ );
+ }],
};
export default preview;
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e3209fc0fe..a389beb1c7 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,12 +1,4 @@
-
{
-
- "editor.codeActionsOnSave": {
- "mode": "explicit",
- "source.fixAll.eslint": "explicit",
- "source.fixAll.stylelint": "explicit"
- },
- "editor.formatOnSave": false,
"javascript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifier": "relative",
"commentTranslate.targetLanguage": "zh-CN",
@@ -90,4 +82,47 @@
"Xinwei"
],
"vsicons.presets.angular": false,
+
+ // Enable the ESlint flat config support
+ "eslint.experimental.useFlatConfig": true,
+
+ // Disable the default formatter, use eslint instead
+ "prettier.enable": false,
+ "editor.formatOnSave": false,
+
+ // Auto fix
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": "explicit",
+ "source.organizeImports": "never",
+ "source.fixAll.stylelint": "explicit"
+ },
+
+ // Silent the stylistic rules in you IDE, but still auto fix them
+ "eslint.rules.customizations": [
+ { "rule": "style/*", "severity": "off" },
+ { "rule": "format/*", "severity": "off" },
+ { "rule": "*-indent", "severity": "off" },
+ { "rule": "*-spacing", "severity": "off" },
+ { "rule": "*-spaces", "severity": "off" },
+ { "rule": "*-order", "severity": "off" },
+ { "rule": "*-dangle", "severity": "off" },
+ { "rule": "*-newline", "severity": "off" },
+ { "rule": "*quotes", "severity": "off" },
+ { "rule": "*semi", "severity": "off" }
+ ],
+
+ // Enable eslint for all supported languages
+ "eslint.validate": [
+ "javascript",
+ "javascriptreact",
+ "typescript",
+ "typescriptreact",
+ "vue",
+ "html",
+ "markdown",
+ "json",
+ "jsonc",
+ "yaml",
+ "toml"
+ ]
}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5559845dad..f56251df72 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -171,4 +171,4 @@ npm create @univerjs/cli init <project-name>
## Links
-* [How to Contribute to Facade API](./packages/facade/docs/CONTRIBUTING.md)
\ No newline at end of file
+* [How to Contribute to Facade API](./packages/facade/docs/CONTRIBUTING.md)
diff --git a/LICENSE.txt b/LICENSE
similarity index 99%
rename from LICENSE.txt
rename to LICENSE
index a16c46afd8..d9a10c0d8e 100644
--- a/LICENSE.txt
+++ b/LICENSE
@@ -1,5 +1,3 @@
-
-
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
diff --git a/README.md b/README.md
index fc7b7045b9..6c4c2ea7c6 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,6 @@ Highlights of Univer:
| [Multi Instances](https://univer.work/playground/?title=Multi%20Instance)<br>Run multi Univer instances on the same page | ![](./docs/img/multi-instances.png) |
| [Uniscript](https://univer.work/playground/?title=Uniscript)<br>Use Uniscript to automate your workflow | ![](./docs/img/uniscript.png) |
-
## Usage
We recommend to import Univer as a npm package. Please checkout the [Quick Start](https://univer.work/en-us/guides/quick-start/) section on the documentation website. We also have an [online playground](https://univer.work/playground/) which can help you preview Univer without setting up the development environment.
diff --git a/codecov.yml b/codecov.yml
index 0b1bd7df52..2e1f8eeb5b 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,13 +1,13 @@
coverage:
- patch: false
- status:
- project:
- default:
- # basic
- target: auto
- threshold: 0
- base: auto
- # advanced settings
- if_ci_failed: error
- informational: false
- only_pulls: false
\ No newline at end of file
+ patch: false
+ status:
+ project:
+ default:
+ # basic
+ target: auto
+ threshold: 0
+ base: auto
+ # advanced settings
+ if_ci_failed: error
+ informational: false
+ only_pulls: false
diff --git a/common/infra/package.json b/common/infra/package.json
new file mode 100644
index 0000000000..62c1781954
--- /dev/null
+++ b/common/infra/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "@univerjs/infra",
+ "version": "0.1.0-beta.2",
+ "private": true,
+ "description": "Some infrastructures for univerjs",
+ "author": "DreamNum <[email protected]>",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/dream-num/univer",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dream-num/univer.git"
+ },
+ "keywords": [],
+ "exports": {
+ "./tsconfigs/*.json": "./tsconfigs/*",
+ "./tsconfigs/*": "./tsconfigs/*.json"
+ },
+ "dependencies": {}
+}
diff --git a/common/infra/tsconfigs/base.json b/common/infra/tsconfigs/base.json
new file mode 100644
index 0000000000..04811c9114
--- /dev/null
+++ b/common/infra/tsconfigs/base.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "compilerOptions": {
+ "target": "ESNext",
+ "jsx": "react",
+ "lib": ["ESNext", "DOM", "DOM.Iterable", "WebWorker"],
+ "useDefineForClassFields": true,
+
+ "experimentalDecorators": true,
+ "module": "ESNext",
+
+ "moduleResolution": "bundler",
+
+ "resolveJsonModule": true,
+ "allowImportingTsExtensions": true,
+
+ "strict": true,
+ "strictPropertyInitialization": false,
+ "noFallthroughCasesInSwitch": true,
+ "noEmit": true,
+ "isolatedModules": true,
+ "skipLibCheck": true
+ }
+}
diff --git a/common/infra/tsconfigs/node.json b/common/infra/tsconfigs/node.json
new file mode 100644
index 0000000000..eee9197199
--- /dev/null
+++ b/common/infra/tsconfigs/node.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "compilerOptions": {
+ "composite": true,
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true
+ }
+}
diff --git a/e2e/demo-todo-app.spec.ts b/e2e/demo-todo-app.spec.ts
index 2fd6016fe8..6bc2ad79f5 100644
--- a/e2e/demo-todo-app.spec.ts
+++ b/e2e/demo-todo-app.spec.ts
@@ -1,437 +1,452 @@
-import { test, expect, type Page } from '@playwright/test';
+/**
+ * Copyright 2023-present DreamNum Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { expect, type Page, test } from '@playwright/test';
test.beforeEach(async ({ page }) => {
- await page.goto('https://demo.playwright.dev/todomvc');
+ await page.goto('https://demo.playwright.dev/todomvc');
});
const TODO_ITEMS = [
- 'buy some cheese',
- 'feed the cat',
- 'book a doctors appointment'
+ 'buy some cheese',
+ 'feed the cat',
+ 'book a doctors appointment',
];
test.describe('New Todo', () => {
- test('should allow me to add todo items', async ({ page }) => {
+ test('should allow me to add todo items', async ({ page }) => {
// create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
+ const newTodo = page.getByPlaceholder('What needs to be done?');
- // Create 1st todo.
- await newTodo.fill(TODO_ITEMS[0]);
- await newTodo.press('Enter');
+ // Create 1st todo.
+ await newTodo.fill(TODO_ITEMS[0]);
+ await newTodo.press('Enter');
- // Make sure the list only has one todo item.
- await expect(page.getByTestId('todo-title')).toHaveText([
- TODO_ITEMS[0]
- ]);
+ // Make sure the list only has one todo item.
+ await expect(page.getByTestId('todo-title')).toHaveText([
+ TODO_ITEMS[0],
+ ]);
- // Create 2nd todo.
- await newTodo.fill(TODO_ITEMS[1]);
- await newTodo.press('Enter');
+ // Create 2nd todo.
+ await newTodo.fill(TODO_ITEMS[1]);
+ await newTodo.press('Enter');
- // Make sure the list now has two todo items.
- await expect(page.getByTestId('todo-title')).toHaveText([
- TODO_ITEMS[0],
- TODO_ITEMS[1]
- ]);
+ // Make sure the list now has two todo items.
+ await expect(page.getByTestId('todo-title')).toHaveText([
+ TODO_ITEMS[0],
+ TODO_ITEMS[1],
+ ]);
- await checkNumberOfTodosInLocalStorage(page, 2);
- });
+ await checkNumberOfTodosInLocalStorage(page, 2);
+ });
- test('should clear text input field when an item is added', async ({ page }) => {
+ test('should clear text input field when an item is added', async ({ page }) => {
// create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
+ const newTodo = page.getByPlaceholder('What needs to be done?');
- // Create one todo item.
- await newTodo.fill(TODO_ITEMS[0]);
- await newTodo.press('Enter');
+ // Create one todo item.
+ await newTodo.fill(TODO_ITEMS[0]);
+ await newTodo.press('Enter');
- // Check that input is empty.
- await expect(newTodo).toBeEmpty();
- await checkNumberOfTodosInLocalStorage(page, 1);
- });
+ // Check that input is empty.
+ await expect(newTodo).toBeEmpty();
+ await checkNumberOfTodosInLocalStorage(page, 1);
+ });
- test('should append new items to the bottom of the list', async ({ page }) => {
+ test('should append new items to the bottom of the list', async ({ page }) => {
// Create 3 items.
- await createDefaultTodos(page);
-
- // create a todo count locator
- const todoCount = page.getByTestId('todo-count')
-
- // Check test using different methods.
- await expect(page.getByText('3 items left')).toBeVisible();
- await expect(todoCount).toHaveText('3 items left');
- await expect(todoCount).toContainText('3');
- await expect(todoCount).toHaveText(/3/);
-
- // Check all items in one call.
- await expect(page.getByTestId('todo-title')).toHaveText(TODO_ITEMS);
- await checkNumberOfTodosInLocalStorage(page, 3);
- });
+ await createDefaultTodos(page);
+
+ // create a todo count locator
+ const todoCount = page.getByTestId('todo-count');
+
+ // Check test using different methods.
+ await expect(page.getByText('3 items left')).toBeVisible();
+ await expect(todoCount).toHaveText('3 items left');
+ await expect(todoCount).toContainText('3');
+ await expect(todoCount).toHaveText(/3/);
+
+ // Check all items in one call.
+ await expect(page.getByTestId('todo-title')).toHaveText(TODO_ITEMS);
+ await checkNumberOfTodosInLocalStorage(page, 3);
+ });
});
test.describe('Mark all as completed', () => {
- test.beforeEach(async ({ page }) => {
- await createDefaultTodos(page);
- await checkNumberOfTodosInLocalStorage(page, 3);
- });
+ test.beforeEach(async ({ page }) => {
+ await createDefaultTodos(page);
+ await checkNumberOfTodosInLocalStorage(page, 3);
+ });
- test.afterEach(async ({ page }) => {
- await checkNumberOfTodosInLocalStorage(page, 3);
- });
+ test.afterEach(async ({ page }) => {
+ await checkNumberOfTodosInLocalStorage(page, 3);
+ });
- test('should allow me to mark all items as completed', async ({ page }) => {
+ test('should allow me to mark all items as completed', async ({ page }) => {
// Complete all todos.
- await page.getByLabel('Mark all as complete').check();
-
- // Ensure all todos have 'completed' class.
- await expect(page.getByTestId('todo-item')).toHaveClass(['completed', 'completed', 'completed']);
- await checkNumberOfCompletedTodosInLocalStorage(page, 3);
- });
-
- test('should allow me to clear the complete state of all items', async ({ page }) => {
- const toggleAll = page.getByLabel('Mark all as complete');
- // Check and then immediately uncheck.
- await toggleAll.check();
- await toggleAll.uncheck();
-
- // Should be no completed classes.
- await expect(page.getByTestId('todo-item')).toHaveClass(['', '', '']);
- });
-
- test('complete all checkbox should update state when items are completed / cleared', async ({ page }) => {
- const toggleAll = page.getByLabel('Mark all as complete');
- await toggleAll.check();
- await expect(toggleAll).toBeChecked();
- await checkNumberOfCompletedTodosInLocalStorage(page, 3);
-
- // Uncheck first todo.
- const firstTodo = page.getByTestId('todo-item').nth(0);
- await firstTodo.getByRole('checkbox').uncheck();
-
- // Reuse toggleAll locator and make sure its not checked.
- await expect(toggleAll).not.toBeChecked();
-
- await firstTodo.getByRole('checkbox').check();
- await checkNumberOfCompletedTodosInLocalStorage(page, 3);
-
- // Assert the toggle all is checked again.
- await expect(toggleAll).toBeChecked();
- });
-});
+ await page.getByLabel('Mark all as complete').check();
-test.describe('Item', () => {
+ // Ensure all todos have 'completed' class.
+ await expect(page.getByTestId('todo-item')).toHaveClass(['completed', 'completed', 'completed']);
+ await checkNumberOfCompletedTodosInLocalStorage(page, 3);
+ });
- test('should allow me to mark items as complete', async ({ page }) => {
- // create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
+ test('should allow me to clear the complete state of all items', async ({ page }) => {
+ const toggleAll = page.getByLabel('Mark all as complete');
+ // Check and then immediately uncheck.
+ await toggleAll.check();
+ await toggleAll.uncheck();
- // Create two items.
- for (const item of TODO_ITEMS.slice(0, 2)) {
- await newTodo.fill(item);
- await newTodo.press('Enter');
- }
+ // Should be no completed classes.
+ await expect(page.getByTestId('todo-item')).toHaveClass(['', '', '']);
+ });
+
+ test('complete all checkbox should update state when items are completed / cleared', async ({ page }) => {
+ const toggleAll = page.getByLabel('Mark all as complete');
+ await toggleAll.check();
+ await expect(toggleAll).toBeChecked();
+ await checkNumberOfCompletedTodosInLocalStorage(page, 3);
- // Check first item.
- const firstTodo = page.getByTestId('todo-item').nth(0);
- await firstTodo.getByRole('checkbox').check();
- await expect(firstTodo).toHaveClass('completed');
+ // Uncheck first todo.
+ const firstTodo = page.getByTestId('todo-item').nth(0);
+ await firstTodo.getByRole('checkbox').uncheck();
- // Check second item.
- const secondTodo = page.getByTestId('todo-item').nth(1);
- await expect(secondTodo).not.toHaveClass('completed');
- await secondTodo.getByRole('checkbox').check();
+ // Reuse toggleAll locator and make sure its not checked.
+ await expect(toggleAll).not.toBeChecked();
- // Assert completed class.
- await expect(firstTodo).toHaveClass('completed');
- await expect(secondTodo).toHaveClass('completed');
- });
+ await firstTodo.getByRole('checkbox').check();
+ await checkNumberOfCompletedTodosInLocalStorage(page, 3);
- test('should allow me to un-mark items as complete', async ({ page }) => {
+ // Assert the toggle all is checked again.
+ await expect(toggleAll).toBeChecked();
+ });
+});
+
+test.describe('Item', () => {
+ test('should allow me to mark items as complete', async ({ page }) => {
// create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
+ const newTodo = page.getByPlaceholder('What needs to be done?');
+
+ // Create two items.
+ for (const item of TODO_ITEMS.slice(0, 2)) {
+ await newTodo.fill(item);
+ await newTodo.press('Enter');
+ }
+
+ // Check first item.
+ const firstTodo = page.getByTestId('todo-item').nth(0);
+ await firstTodo.getByRole('checkbox').check();
+ await expect(firstTodo).toHaveClass('completed');
+
+ // Check second item.
+ const secondTodo = page.getByTestId('todo-item').nth(1);
+ await expect(secondTodo).not.toHaveClass('completed');
+ await secondTodo.getByRole('checkbox').check();
+
+ // Assert completed class.
+ await expect(firstTodo).toHaveClass('completed');
+ await expect(secondTodo).toHaveClass('completed');
+ });
- // Create two items.
- for (const item of TODO_ITEMS.slice(0, 2)) {
- await newTodo.fill(item);
- await newTodo.press('Enter');
- }
+ test('should allow me to un-mark items as complete', async ({ page }) => {
+ // create a new todo locator
+ const newTodo = page.getByPlaceholder('What needs to be done?');
+
+ // Create two items.
+ for (const item of TODO_ITEMS.slice(0, 2)) {
+ await newTodo.fill(item);
+ await newTodo.press('Enter');
+ }
+
+ const firstTodo = page.getByTestId('todo-item').nth(0);
+ const secondTodo = page.getByTestId('todo-item').nth(1);
+ const firstTodoCheckbox = firstTodo.getByRole('checkbox');
+
+ await firstTodoCheckbox.check();
+ await expect(firstTodo).toHaveClass('completed');
+ await expect(secondTodo).not.toHaveClass('completed');
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+
+ await firstTodoCheckbox.uncheck();
+ await expect(firstTodo).not.toHaveClass('completed');
+ await expect(secondTodo).not.toHaveClass('completed');
+ await checkNumberOfCompletedTodosInLocalStorage(page, 0);
+ });
- const firstTodo = page.getByTestId('todo-item').nth(0);
- const secondTodo = page.getByTestId('todo-item').nth(1);
- const firstTodoCheckbox = firstTodo.getByRole('checkbox');
-
- await firstTodoCheckbox.check();
- await expect(firstTodo).toHaveClass('completed');
- await expect(secondTodo).not.toHaveClass('completed');
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
-
- await firstTodoCheckbox.uncheck();
- await expect(firstTodo).not.toHaveClass('completed');
- await expect(secondTodo).not.toHaveClass('completed');
- await checkNumberOfCompletedTodosInLocalStorage(page, 0);
- });
-
- test('should allow me to edit an item', async ({ page }) => {
- await createDefaultTodos(page);
-
- const todoItems = page.getByTestId('todo-item');
- const secondTodo = todoItems.nth(1);
- await secondTodo.dblclick();
- await expect(secondTodo.getByRole('textbox', { name: 'Edit' })).toHaveValue(TODO_ITEMS[1]);
- await secondTodo.getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
- await secondTodo.getByRole('textbox', { name: 'Edit' }).press('Enter');
-
- // Explicitly assert the new text value.
- await expect(todoItems).toHaveText([
- TODO_ITEMS[0],
- 'buy some sausages',
- TODO_ITEMS[2]
- ]);
- await checkTodosInLocalStorage(page, 'buy some sausages');
- });
+ test('should allow me to edit an item', async ({ page }) => {
+ await createDefaultTodos(page);
+
+ const todoItems = page.getByTestId('todo-item');
+ const secondTodo = todoItems.nth(1);
+ await secondTodo.dblclick();
+ await expect(secondTodo.getByRole('textbox', { name: 'Edit' })).toHaveValue(TODO_ITEMS[1]);
+ await secondTodo.getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
+ await secondTodo.getByRole('textbox', { name: 'Edit' }).press('Enter');
+
+ // Explicitly assert the new text value.
+ await expect(todoItems).toHaveText([
+ TODO_ITEMS[0],
+ 'buy some sausages',
+ TODO_ITEMS[2],
+ ]);
+ await checkTodosInLocalStorage(page, 'buy some sausages');
+ });
});
test.describe('Editing', () => {
- test.beforeEach(async ({ page }) => {
- await createDefaultTodos(page);
- await checkNumberOfTodosInLocalStorage(page, 3);
- });
-
- test('should hide other controls when editing', async ({ page }) => {
- const todoItem = page.getByTestId('todo-item').nth(1);
- await todoItem.dblclick();
- await expect(todoItem.getByRole('checkbox')).not.toBeVisible();
- await expect(todoItem.locator('label', {
- hasText: TODO_ITEMS[1],
- })).not.toBeVisible();
- await checkNumberOfTodosInLocalStorage(page, 3);
- });
-
- test('should save edits on blur', async ({ page }) => {
- const todoItems = page.getByTestId('todo-item');
- await todoItems.nth(1).dblclick();
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).dispatchEvent('blur');
-
- await expect(todoItems).toHaveText([
- TODO_ITEMS[0],
- 'buy some sausages',
- TODO_ITEMS[2],
- ]);
- await checkTodosInLocalStorage(page, 'buy some sausages');
- });
-
- test('should trim entered text', async ({ page }) => {
- const todoItems = page.getByTestId('todo-item');
- await todoItems.nth(1).dblclick();
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill(' buy some sausages ');
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter');
-
- await expect(todoItems).toHaveText([
- TODO_ITEMS[0],
- 'buy some sausages',
- TODO_ITEMS[2],
- ]);
- await checkTodosInLocalStorage(page, 'buy some sausages');
- });
-
- test('should remove the item if an empty text string was entered', async ({ page }) => {
- const todoItems = page.getByTestId('todo-item');
- await todoItems.nth(1).dblclick();
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('');
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter');
-
- await expect(todoItems).toHaveText([
- TODO_ITEMS[0],
- TODO_ITEMS[2],
- ]);
- });
-
- test('should cancel edits on escape', async ({ page }) => {
- const todoItems = page.getByTestId('todo-item');
- await todoItems.nth(1).dblclick();
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
- await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Escape');
- await expect(todoItems).toHaveText(TODO_ITEMS);
- });
+ test.beforeEach(async ({ page }) => {
+ await createDefaultTodos(page);
+ await checkNumberOfTodosInLocalStorage(page, 3);
+ });
+
+ test('should hide other controls when editing', async ({ page }) => {
+ const todoItem = page.getByTestId('todo-item').nth(1);
+ await todoItem.dblclick();
+ await expect(todoItem.getByRole('checkbox')).not.toBeVisible();
+ await expect(todoItem.locator('label', {
+ hasText: TODO_ITEMS[1],
+ })).not.toBeVisible();
+ await checkNumberOfTodosInLocalStorage(page, 3);
+ });
+
+ test('should save edits on blur', async ({ page }) => {
+ const todoItems = page.getByTestId('todo-item');
+ await todoItems.nth(1).dblclick();
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).dispatchEvent('blur');
+
+ await expect(todoItems).toHaveText([
+ TODO_ITEMS[0],
+ 'buy some sausages',
+ TODO_ITEMS[2],
+ ]);
+ await checkTodosInLocalStorage(page, 'buy some sausages');
+ });
+
+ test('should trim entered text', async ({ page }) => {
+ const todoItems = page.getByTestId('todo-item');
+ await todoItems.nth(1).dblclick();
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill(' buy some sausages ');
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter');
+
+ await expect(todoItems).toHaveText([
+ TODO_ITEMS[0],
+ 'buy some sausages',
+ TODO_ITEMS[2],
+ ]);
+ await checkTodosInLocalStorage(page, 'buy some sausages');
+ });
+
+ test('should remove the item if an empty text string was entered', async ({ page }) => {
+ const todoItems = page.getByTestId('todo-item');
+ await todoItems.nth(1).dblclick();
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('');
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter');
+
+ await expect(todoItems).toHaveText([
+ TODO_ITEMS[0],
+ TODO_ITEMS[2],
+ ]);
+ });
+
+ test('should cancel edits on escape', async ({ page }) => {
+ const todoItems = page.getByTestId('todo-item');
+ await todoItems.nth(1).dblclick();
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages');
+ await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Escape');
+ await expect(todoItems).toHaveText(TODO_ITEMS);
+ });
});
test.describe('Counter', () => {
- test('should display the current number of todo items', async ({ page }) => {
+ test('should display the current number of todo items', async ({ page }) => {
// create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
-
- // create a todo count locator
- const todoCount = page.getByTestId('todo-count')
+ const newTodo = page.getByPlaceholder('What needs to be done?');
- await newTodo.fill(TODO_ITEMS[0]);
- await newTodo.press('Enter');
+ // create a todo count locator
+ const todoCount = page.getByTestId('todo-count');
- await expect(todoCount).toContainText('1');
+ await newTodo.fill(TODO_ITEMS[0]);
+ await newTodo.press('Enter');
- await newTodo.fill(TODO_ITEMS[1]);
- await newTodo.press('Enter');
- await expect(todoCount).toContainText('2');
+ await expect(todoCount).toContainText('1');
- await checkNumberOfTodosInLocalStorage(page, 2);
- });
+ await newTodo.fill(TODO_ITEMS[1]);
+ await newTodo.press('Enter');
+ await expect(todoCount).toContainText('2');
+
+ await checkNumberOfTodosInLocalStorage(page, 2);
+ });
});
test.describe('Clear completed button', () => {
- test.beforeEach(async ({ page }) => {
- await createDefaultTodos(page);
- });
-
- test('should display the correct text', async ({ page }) => {
- await page.locator('.todo-list li .toggle').first().check();
- await expect(page.getByRole('button', { name: 'Clear completed' })).toBeVisible();
- });
-
- test('should remove completed items when clicked', async ({ page }) => {
- const todoItems = page.getByTestId('todo-item');
- await todoItems.nth(1).getByRole('checkbox').check();
- await page.getByRole('button', { name: 'Clear completed' }).click();
- await expect(todoItems).toHaveCount(2);
- await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]);
- });
-
- test('should be hidden when there are no items that are completed', async ({ page }) => {
- await page.locator('.todo-list li .toggle').first().check();
- await page.getByRole('button', { name: 'Clear completed' }).click();
- await expect(page.getByRole('button', { name: 'Clear completed' })).toBeHidden();
- });
+ test.beforeEach(async ({ page }) => {
+ await createDefaultTodos(page);
+ });
+
+ test('should display the correct text', async ({ page }) => {
+ await page.locator('.todo-list li .toggle').first().check();
+ await expect(page.getByRole('button', { name: 'Clear completed' })).toBeVisible();
+ });
+
+ test('should remove completed items when clicked', async ({ page }) => {
+ const todoItems = page.getByTestId('todo-item');
+ await todoItems.nth(1).getByRole('checkbox').check();
+ await page.getByRole('button', { name: 'Clear completed' }).click();
+ await expect(todoItems).toHaveCount(2);
+ await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]);
+ });
+
+ test('should be hidden when there are no items that are completed', async ({ page }) => {
+ await page.locator('.todo-list li .toggle').first().check();
+ await page.getByRole('button', { name: 'Clear completed' }).click();
+ await expect(page.getByRole('button', { name: 'Clear completed' })).toBeHidden();
+ });
});
test.describe('Persistence', () => {
- test('should persist its data', async ({ page }) => {
+ test('should persist its data', async ({ page }) => {
// create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
-
- for (const item of TODO_ITEMS.slice(0, 2)) {
- await newTodo.fill(item);
- await newTodo.press('Enter');
- }
-
- const todoItems = page.getByTestId('todo-item');
- const firstTodoCheck = todoItems.nth(0).getByRole('checkbox');
- await firstTodoCheck.check();
- await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]);
- await expect(firstTodoCheck).toBeChecked();
- await expect(todoItems).toHaveClass(['completed', '']);
-
- // Ensure there is 1 completed item.
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
-
- // Now reload.
- await page.reload();
- await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]);
- await expect(firstTodoCheck).toBeChecked();
- await expect(todoItems).toHaveClass(['completed', '']);
- });
+ const newTodo = page.getByPlaceholder('What needs to be done?');
+
+ for (const item of TODO_ITEMS.slice(0, 2)) {
+ await newTodo.fill(item);
+ await newTodo.press('Enter');
+ }
+
+ const todoItems = page.getByTestId('todo-item');
+ const firstTodoCheck = todoItems.nth(0).getByRole('checkbox');
+ await firstTodoCheck.check();
+ await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]);
+ await expect(firstTodoCheck).toBeChecked();
+ await expect(todoItems).toHaveClass(['completed', '']);
+
+ // Ensure there is 1 completed item.
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+
+ // Now reload.
+ await page.reload();
+ await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]);
+ await expect(firstTodoCheck).toBeChecked();
+ await expect(todoItems).toHaveClass(['completed', '']);
+ });
});
test.describe('Routing', () => {
- test.beforeEach(async ({ page }) => {
- await createDefaultTodos(page);
- // make sure the app had a chance to save updated todos in storage
- // before navigating to a new view, otherwise the items can get lost :(
- // in some frameworks like Durandal
- await checkTodosInLocalStorage(page, TODO_ITEMS[0]);
- });
-
- test('should allow me to display active items', async ({ page }) => {
- const todoItem = page.getByTestId('todo-item');
- await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
-
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
- await page.getByRole('link', { name: 'Active' }).click();
- await expect(todoItem).toHaveCount(2);
- await expect(todoItem).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]);
- });
-
- test('should respect the back button', async ({ page }) => {
- const todoItem = page.getByTestId('todo-item');
- await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
-
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
-
- await test.step('Showing all items', async () => {
- await page.getByRole('link', { name: 'All' }).click();
- await expect(todoItem).toHaveCount(3);
+ test.beforeEach(async ({ page }) => {
+ await createDefaultTodos(page);
+ // make sure the app had a chance to save updated todos in storage
+ // before navigating to a new view, otherwise the items can get lost :(
+ // in some frameworks like Durandal
+ await checkTodosInLocalStorage(page, TODO_ITEMS[0]);
+ });
+
+ test('should allow me to display active items', async ({ page }) => {
+ const todoItem = page.getByTestId('todo-item');
+ await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
+
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+ await page.getByRole('link', { name: 'Active' }).click();
+ await expect(todoItem).toHaveCount(2);
+ await expect(todoItem).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]);
+ });
+
+ test('should respect the back button', async ({ page }) => {
+ const todoItem = page.getByTestId('todo-item');
+ await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
+
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+
+ await test.step('Showing all items', async () => {
+ await page.getByRole('link', { name: 'All' }).click();
+ await expect(todoItem).toHaveCount(3);
+ });
+
+ await test.step('Showing active items', async () => {
+ await page.getByRole('link', { name: 'Active' }).click();
+ });
+
+ await test.step('Showing completed items', async () => {
+ await page.getByRole('link', { name: 'Completed' }).click();
+ });
+
+ await expect(todoItem).toHaveCount(1);
+ await page.goBack();
+ await expect(todoItem).toHaveCount(2);
+ await page.goBack();
+ await expect(todoItem).toHaveCount(3);
});
- await test.step('Showing active items', async () => {
- await page.getByRole('link', { name: 'Active' }).click();
+ test('should allow me to display completed items', async ({ page }) => {
+ await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+ await page.getByRole('link', { name: 'Completed' }).click();
+ await expect(page.getByTestId('todo-item')).toHaveCount(1);
});
- await test.step('Showing completed items', async () => {
- await page.getByRole('link', { name: 'Completed' }).click();
+ test('should allow me to display all items', async ({ page }) => {
+ await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
+ await checkNumberOfCompletedTodosInLocalStorage(page, 1);
+ await page.getByRole('link', { name: 'Active' }).click();
+ await page.getByRole('link', { name: 'Completed' }).click();
+ await page.getByRole('link', { name: 'All' }).click();
+ await expect(page.getByTestId('todo-item')).toHaveCount(3);
});
- await expect(todoItem).toHaveCount(1);
- await page.goBack();
- await expect(todoItem).toHaveCount(2);
- await page.goBack();
- await expect(todoItem).toHaveCount(3);
- });
-
- test('should allow me to display completed items', async ({ page }) => {
- await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
- await page.getByRole('link', { name: 'Completed' }).click();
- await expect(page.getByTestId('todo-item')).toHaveCount(1);
- });
-
- test('should allow me to display all items', async ({ page }) => {
- await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check();
- await checkNumberOfCompletedTodosInLocalStorage(page, 1);
- await page.getByRole('link', { name: 'Active' }).click();
- await page.getByRole('link', { name: 'Completed' }).click();
- await page.getByRole('link', { name: 'All' }).click();
- await expect(page.getByTestId('todo-item')).toHaveCount(3);
- });
-
- test('should highlight the currently applied filter', async ({ page }) => {
- await expect(page.getByRole('link', { name: 'All' })).toHaveClass('selected');
-
- //create locators for active and completed links
- const activeLink = page.getByRole('link', { name: 'Active' });
- const completedLink = page.getByRole('link', { name: 'Completed' });
- await activeLink.click();
-
- // Page change - active items.
- await expect(activeLink).toHaveClass('selected');
- await completedLink.click();
-
- // Page change - completed items.
- await expect(completedLink).toHaveClass('selected');
- });
+ test('should highlight the currently applied filter', async ({ page }) => {
+ await expect(page.getByRole('link', { name: 'All' })).toHaveClass('selected');
+
+ //create locators for active and completed links
+ const activeLink = page.getByRole('link', { name: 'Active' });
+ const completedLink = page.getByRole('link', { name: 'Completed' });
+ await activeLink.click();
+
+ // Page change - active items.
+ await expect(activeLink).toHaveClass('selected');
+ await completedLink.click();
+
+ // Page change - completed items.
+ await expect(completedLink).toHaveClass('selected');
+ });
});
async function createDefaultTodos(page: Page) {
- // create a new todo locator
- const newTodo = page.getByPlaceholder('What needs to be done?');
+ // create a new todo locator
+ const newTodo = page.getByPlaceholder('What needs to be done?');
- for (const item of TODO_ITEMS) {
- await newTodo.fill(item);
- await newTodo.press('Enter');
- }
+ for (const item of TODO_ITEMS) {
+ await newTodo.fill(item);
+ await newTodo.press('Enter');
+ }
}
async function checkNumberOfTodosInLocalStorage(page: Page, expected: number) {
- return await page.waitForFunction(e => {
- return JSON.parse(localStorage['react-todos']).length === e;
- }, expected);
+ return await page.waitForFunction((e) => {
+ return JSON.parse(localStorage['react-todos']).length === e;
+ }, expected);
}
async function checkNumberOfCompletedTodosInLocalStorage(page: Page, expected: number) {
- return await page.waitForFunction(e => {
- return JSON.parse(localStorage['react-todos']).filter((todo: any) => todo.completed).length === e;
- }, expected);
+ return await page.waitForFunction((e) => {
+ return JSON.parse(localStorage['react-todos']).filter((todo: any) => todo.completed).length === e;
+ }, expected);
}
async function checkTodosInLocalStorage(page: Page, title: string) {
- return await page.waitForFunction(t => {
- return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t);
- }, title);
+ return await page.waitForFunction((t) => {
+ return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t);
+ }, title);
}
diff --git a/e2e/example.spec.ts b/e2e/example.spec.ts
index 54a906a4e8..86fa86d7a7 100644
--- a/e2e/example.spec.ts
+++ b/e2e/example.spec.ts
@@ -1,18 +1,34 @@
-import { test, expect } from '@playwright/test';
+/**
+ * Copyright 2023-present DreamNum Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { expect, test } from '@playwright/test';
test('has title', async ({ page }) => {
- await page.goto('https://playwright.dev/');
+ await page.goto('https://playwright.dev/');
- // Expect a title "to contain" a substring.
- await expect(page).toHaveTitle(/Playwright/);
+ // Expect a title "to contain" a substring.
+ await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
- await page.goto('https://playwright.dev/');
+ await page.goto('https://playwright.dev/');
- // Click the get started link.
- await page.getByRole('link', { name: 'Get started' }).click();
+ // Click the get started link.
+ await page.getByRole('link', { name: 'Get started' }).click();
- // Expects page to have a heading with the name of Installation.
- await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
+ // Expects page to have a heading with the name of Installation.
+ await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000000..c3be2ba86f
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,161 @@
+import antfu from '@antfu/eslint-config';
+import header from 'eslint-plugin-header';
+import tsParser from '@typescript-eslint/parser';
+
+export default antfu({
+ stylistic: {
+ indent: 4,
+ semi: true,
+ },
+ react: true,
+ yaml: {
+ overrides: {
+ 'yaml/indent': ['error', 4, { indicatorValueIndent: 2 }],
+ },
+ },
+ markdown: false,
+ rules: {
+ 'import/no-cycle': 'error',
+ 'ts/no-explicit-any': 'warn',
+ 'style/brace-style': ['warn', '1tbs', { allowSingleLine: true }],
+ 'style/comma-dangle': ['error', {
+ arrays: 'always-multiline',
+ objects: 'always-multiline',
+ imports: 'always-multiline',
+ exports: 'always-multiline',
+ enums: 'always-multiline',
+ functions: 'never',
+ }],
+ 'style/arrow-parens': ['error', 'always'],
+ curly: ['error', 'multi-line'],
+ 'antfu/if-newline': 'off',
+ 'style/spaced-comment': 'off',
+ 'tunicorn/number-literal-case': 'off',
+ 'style/indent-binary-ops': 'off',
+
+ 'style/indent': ['error', 4, {
+ ObjectExpression: 'first',
+ SwitchCase: 1,
+ ignoreComments: true,
+ }],
+ 'sort-imports': [
+ 'error',
+ {
+ allowSeparatedGroups: false,
+ // ignoreCase: false,
+ ignoreCase: true,
+ ignoreDeclarationSort: true,
+ ignoreMemberSort: false,
+ memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
+ },
+ ],
+
+ // TODO: debatable rules
+ 'test/prefer-lowercase-title': 'off',
+ 'antfu/top-level-function': 'off',
+ 'style/operator-linebreak': 'off',
+ 'unicorn/no-new-array': 'off',
+ 'unicorn/prefer-includes': 'off',
+ 'prefer-arrow-callback': 'off',
+ 'no-restricted-globals': 'off',
+ 'unicorn/prefer-string-starts-ends-with': 'warn',
+
+ // TODO: just for compatibility with old code
+ 'unused-imports/no-unused-vars': 'warn',
+ 'style/jsx-closing-tag-location': 'warn',
+ 'ts/ban-types': 'warn',
+ 'unicorn/prefer-dom-node-text-content': 'warn',
+ 'unicorn/prefer-number-properties': 'warn',
+ 'no-prototype-builtins': 'warn',
+ 'style/no-tabs': 'warn',
+ 'style/quotes': ['warn', 'single', { avoidEscape: true }],
+
+ 'react/display-name': 'off',
+ 'react-hooks/rules-of-hooks': 'off',
+ 'eslint-comments/no-unlimited-disable': 'off',
+ 'ts/prefer-ts-expect-error': 'off',
+ 'ts/ban-ts-comment': 'off',
+ 'ts/no-duplicate-enum-values': 'off',
+ 'no-cond-assign': 'warn',
+ 'antfu/consistent-list-newline': 'off',
+ 'ts/no-use-before-define': 'warn',
+ 'intunicorn/number-literal-case': 'off',
+ 'ts/no-redeclare': 'warn',
+ 'test/no-identical-title': 'warn',
+ 'ts/no-non-null-asserted-optional-chain': 'warn',
+ 'no-restricted-syntax': 'warn',
+ 'prefer-regex-literals': 'warn',
+ 'ts/no-this-alias': 'warn',
+ 'prefer-promise-reject-errors': 'warn',
+ 'no-new': 'warn',
+ 'unicorn/error-message': 'warn',
+ 'ts/prefer-literal-enum-member': 'warn',
+ 'style/jsx-curly-newline': ['warn', { multiline: 'forbid', singleline: 'forbid' }],
+ 'no-control-regex': 'warn',
+ 'style/jsx-wrap-multilines': 'warn',
+ 'ts/no-import-type-side-effects': 'warn',
+ 'style/quote-props': ['warn', 'as-needed'],
+ 'unicorn/number-literal-case': 'warn',
+ 'react/no-direct-mutation-state': 'warn',
+ 'style/jsx-curly-brace-presence': 'warn',
+ 'style/multiline-ternary': 'warn',
+ 'unicorn/prefer-type-error': 'warn',
+ 'accessor-pairs': 'warn',
+ },
+}, {
+ files: ['**/*.ts', '**/*.tsx'],
+ ignores: ['**/*.d.ts', '**/vite.config.ts', 'playwright.config.ts'],
+ plugins: {
+ header,
+ },
+ rules: {
+ 'header/header': [
+ 2,
+ 'block',
+ [
+ '*',
+ ' * Copyright 2023-present DreamNum Inc.',
+ ' *',
+ ' * Licensed under the Apache License, Version 2.0 (the "License");',
+ ' * you may not use this file except in compliance with the License.',
+ ' * You may obtain a copy of the License at',
+ ' *',
+ ' * http://www.apache.org/licenses/LICENSE-2.0',
+ ' *',
+ ' * Unless required by applicable law or agreed to in writing, software',
+ ' * distributed under the License is distributed on an "AS IS" BASIS,',
+ ' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
+ ' * See the License for the specific language governing permissions and',
+ ' * limitations under the License.',
+ ' ',
+ ],
+ 2,
+ ],
+ },
+}, {
+ files: ['**/*.ts', '**/*.tsx'],
+ rules: {
+ 'ts/naming-convention': [
+ 'warn',
+ // Interfaces' names should start with a capital 'I'.
+ {
+ selector: 'interface',
+ format: ['PascalCase'],
+ custom: {
+ regex: '^I[A-Z0-9]',
+ match: true,
+ },
+ },
+ // Private fields of a class should start with an underscore '_'.
+ {
+ selector: ['classMethod', 'classProperty'],
+ modifiers: ['private'],
+ format: ['camelCase'],
+ leadingUnderscore: 'require',
+ },
+ ],
+ },
+ languageOptions: {
+ parser: tsParser,
+ },
+});
diff --git a/examples/esbuild.config.mjs b/examples/esbuild.config.mjs
index dd16d01be9..519a500fb6 100644
--- a/examples/esbuild.config.mjs
+++ b/examples/esbuild.config.mjs
@@ -1,11 +1,12 @@
import path from 'node:path';
+import process from 'node:process';
+import { execSync } from 'node:child_process';
import esbuild from 'esbuild';
import cleanPlugin from 'esbuild-plugin-clean';
import copyPlugin from 'esbuild-plugin-copy';
import stylePlugin from 'esbuild-style-plugin';
import minimist from 'minimist';
-import { execSync } from 'node:child_process';
const nodeModules = path.resolve(process.cwd(), './node_modules');
@@ -18,8 +19,8 @@ const monacoEditorEntryPoints = ['vs/language/typescript/ts.worker.js', 'vs/edit
const gitCommitHash = execSync('git rev-parse --short HEAD').toString().trim();
const gitRefName = execSync('git symbolic-ref -q --short HEAD || git describe --tags --exact-match').toString().trim();
-const monacoBuildTask = () =>
- esbuild.build({
+function monacoBuildTask() {
+ return esbuild.build({
entryPoints: monacoEditorEntryPoints.map((entry) => `./node_modules/monaco-editor/esm/${entry}`),
bundle: true,
color: true,
@@ -32,6 +33,7 @@ const monacoBuildTask = () =>
}),
],
});
+}
const ctx = await esbuild[args.watch ? 'context' : 'build']({
bundle: true,
@@ -93,11 +95,13 @@ if (args.watch) {
await monacoBuildTask();
await ctx.watch();
- const { host, port } = await ctx.serve({
+ const { port } = await ctx.serve({
servedir: './local',
port: 3002,
});
const url = `http://localhost:${port}`;
+
+ // eslint-disable-next-line no-console
console.log(`Local server: ${url}`);
}
diff --git a/examples/package.json b/examples/package.json
index daed6e1816..3561bb6dea 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -1,12 +1,13 @@
{
"name": "univer-examples",
+ "private": true,
"description": "Univer vanilla ts demo project",
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
- "private": true,
"scripts": {
"build:demo": "node ./esbuild.config.mjs",
- "dev:demo": "node ./esbuild.config.mjs --watch"
+ "dev:demo": "node ./esbuild.config.mjs --watch",
+ "lint:types": "tsc --noEmit"
},
"dependencies": {
"@univerjs/core": "workspace:*",
@@ -14,8 +15,8 @@
"@univerjs/docs": "workspace:*",
"@univerjs/docs-ui": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
- "@univerjs/find-replace": "workspace:*",
"@univerjs/engine-render": "workspace:*",
+ "@univerjs/find-replace": "workspace:*",
"@univerjs/icons": "^0.1.26",
"@univerjs/rpc": "workspace:*",
"@univerjs/sheets": "workspace:*",
@@ -39,6 +40,7 @@
"devDependencies": {
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
+ "@univerjs/infra": "workspace:*",
"esbuild": "^0.19.10",
"esbuild-plugin-clean": "^1.0.1",
"esbuild-plugin-copy": "^2.1.1",
diff --git a/examples/src/docs/main.ts b/examples/src/docs/main.ts
index 359c134483..ccd14ee0c7 100644
--- a/examples/src/docs/main.ts
+++ b/examples/src/docs/main.ts
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+/* eslint-disable node/prefer-global/process */
import { LocaleType, Univer } from '@univerjs/core';
import { defaultTheme } from '@univerjs/design';
import { UniverDocsPlugin } from '@univerjs/docs';
@@ -65,7 +66,6 @@ univer.createUniverDoc(DEFAULT_DOCUMENT_DATA_CN);
// use for console test
declare global {
- // eslint-disable-next-line @typescript-eslint/naming-convention
interface Window {
univer?: Univer;
}
diff --git a/examples/src/main.tsx b/examples/src/main.tsx
index 8fb2396250..a4cf2bdb22 100644
--- a/examples/src/main.tsx
+++ b/examples/src/main.tsx
@@ -22,9 +22,13 @@ import styles from './styles.module.less';
// package info
// eslint-disable-next-line no-console
console.table({
+ // eslint-disable-next-line node/prefer-global/process
NODE_ENV: process.env.NODE_ENV,
+ // eslint-disable-next-line node/prefer-global/process
GIT_COMMIT_HASH: process.env.GIT_COMMIT_HASH,
+ // eslint-disable-next-line node/prefer-global/process
GIT_REF_NAME: process.env.GIT_REF_NAME,
+ // eslint-disable-next-line node/prefer-global/process
BUILD_TIME: process.env.BUILD_TIME,
});
@@ -33,23 +37,28 @@ function Examples() {
<section className={styles.examples}>
<a className={styles.btn} href="./sheets/">
<span> Univer Sheets</span>
- <div className={styles.btnBg}>→</div>{' '}
+ <div className={styles.btnBg}>→</div>
+ {' '}
</a>
<a className={styles.btn} href="./docs/">
<span> Univer Docs</span>
- <div className={styles.btnBg}>→</div>{' '}
+ <div className={styles.btnBg}>→</div>
+ {' '}
</a>
<a className={styles.btn} href="./slides/">
<span> Univer Slides</span>
- <div className={styles.btnBg}>→</div>{' '}
+ <div className={styles.btnBg}>→</div>
+ {' '}
</a>
<a className={styles.btn} href="./sheets-multi/">
<span> Univer Multi Instance</span>
- <div className={styles.btnBg}>→</div>{' '}
+ <div className={styles.btnBg}>→</div>
+ {' '}
</a>
<a className={styles.btn} href="./uniscript/">
<span> Uniscript</span>
- <div className={styles.btnBg}>→</div>{' '}
+ <div className={styles.btnBg}>→</div>
+ {' '}
</a>
</section>
);
diff --git a/examples/src/plugins/debugger/commands/operations/notification.operation.ts b/examples/src/plugins/debugger/commands/operations/notification.operation.ts
index 24d233190b..159eed6ac6 100644
--- a/examples/src/plugins/debugger/commands/operations/notification.operation.ts
+++ b/examples/src/plugins/debugger/commands/operations/notification.operation.ts
@@ -33,10 +33,10 @@ export const NotificationOperation: ICommand = {
value.indexOf('Success') > -1
? 'success'
: value.indexOf('Info') > -1
- ? 'info'
- : value.indexOf('Warning') > -1
- ? 'warning'
- : 'error';
+ ? 'info'
+ : value.indexOf('Warning') > -1
+ ? 'warning'
+ : 'error';
notificationService.show({
type,
content: value || 'Notification Content',
diff --git a/examples/src/plugins/debugger/commands/operations/save-snapshot.operations.ts b/examples/src/plugins/debugger/commands/operations/save-snapshot.operations.ts
index f435f03654..da9f4ed086 100644
--- a/examples/src/plugins/debugger/commands/operations/save-snapshot.operations.ts
+++ b/examples/src/plugins/debugger/commands/operations/save-snapshot.operations.ts
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+/* eslint-disable node/prefer-global/process */
import type { ICommand, IStyleData, IWorkbookData } from '@univerjs/core';
import { CommandType, ISnapshotPersistenceService, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
import type { IAccessor } from '@wendellhu/redi';
@@ -65,8 +66,9 @@ export const SaveSnapshotOptions: ICommand = {
const sheet = snapshot.sheets[sheetId];
snapshot.sheets = { [sheetId]: sheet };
snapshot.sheetOrder = [sheetId];
+ break;
}
- // eslint-disable-next-line no-fallthrough
+
case 'workbook': {
const text = JSON.stringify(filterStyle(snapshot), null, 2);
// navigator.clipboard.writeText(text);
diff --git a/examples/src/sheets-multi/main.tsx b/examples/src/sheets-multi/main.tsx
index 468567ec88..3c61050d87 100644
--- a/examples/src/sheets-multi/main.tsx
+++ b/examples/src/sheets-multi/main.tsx
@@ -28,7 +28,7 @@ import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
import { UniverUIPlugin } from '@univerjs/ui';
import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import { Mosaic, MosaicWindow } from 'react-mosaic-component';
import { DEFAULT_WORKBOOK_DATA_DEMO } from '../data';
@@ -99,7 +99,7 @@ export const App = (
/>
);
-ReactDOM.render(App, document.getElementById('container'));
+createRoot(document.getElementById('container')!).render(App);
factory('app-a')();
factory('app-b')();
diff --git a/examples/src/sheets/main.ts b/examples/src/sheets/main.ts
index 75f0172f74..408775086e 100644
--- a/examples/src/sheets/main.ts
+++ b/examples/src/sheets/main.ts
@@ -84,7 +84,6 @@ univer.registerPlugin(UniverSheetsFindPlugin);
univer.createUniverSheet(DEFAULT_WORKBOOK_DATA_DEMO);
declare global {
- // eslint-disable-next-line @typescript-eslint/naming-convention
interface Window {
univer?: Univer;
}
diff --git a/examples/src/slides/main.ts b/examples/src/slides/main.ts
index 83a1d89de0..1ee00a7dda 100644
--- a/examples/src/slides/main.ts
+++ b/examples/src/slides/main.ts
@@ -45,7 +45,6 @@ univer.createUniverSlide(DEFAULT_SLIDE_DATA);
// use for console test
declare global {
- // eslint-disable-next-line @typescript-eslint/naming-convention
interface Window {
univer?: Univer;
}
diff --git a/examples/src/uniscript/change-font-style.js b/examples/src/uniscript/change-font-style.js
index baf3f18af5..810672c3ea 100644
--- a/examples/src/uniscript/change-font-style.js
+++ b/examples/src/uniscript/change-font-style.js
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable */
-
const activeSheet = univerAPI.getCurrentSheet().getActiveSheet();
// Set A1:B2 to bold
diff --git a/examples/src/uniscript/main.ts b/examples/src/uniscript/main.ts
index 722f6fda8f..e097fd80af 100644
--- a/examples/src/uniscript/main.ts
+++ b/examples/src/uniscript/main.ts
@@ -69,7 +69,6 @@ univer.registerPlugin(UniverUniscriptPlugin, {
univer.createUniverSheet(UNISCRIT_WORKBOOK_DATA_DEMO);
declare global {
- // eslint-disable-next-line @typescript-eslint/naming-convention
interface Window {
univer?: Univer;
}
diff --git a/examples/tsconfig.json b/examples/tsconfig.json
index 672750de43..16f4030861 100644
--- a/examples/tsconfig.json
+++ b/examples/tsconfig.json
@@ -1,14 +1,8 @@
{
- "extends": "../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": "./src",
- "outDir": "local",
- "downlevelIteration": true,
- "esModuleInterop": true,
- "emitDecoratorMetadata": true,
- "strictPropertyInitialization": false,
- "types": ["esbuild-style-plugin"]
+ "types": ["esbuild-style-plugin"],
+ "outDir": "local"
},
- "include": ["src/**/*"],
- "exclude": ["node_modules", "local"]
+ "include": ["src"]
}
diff --git a/package.json b/package.json
index 3a680776ba..d2c37958c2 100644
--- a/package.json
+++ b/package.json
@@ -1,29 +1,31 @@
{
"name": "univer",
+ "type": "module",
"version": "0.1.0-beta.2",
"private": true,
+ "author": "DreamNum Inc. <[email protected]>",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.17.0",
+ "pnpm": "^8.6.2"
+ },
"scripts": {
"prepare": "husky install",
"pre-commit": "lint-staged",
"dev:demo": "turbo dev:demo",
"dev:storybook": "storybook dev -p 6006 --no-open",
- "lint": "eslint --cache **/src/**/*.{tsx,ts}",
- "lint:fix": "eslint --cache **/src/**/*.{tsx,ts} --fix",
"lint:style": "stylelint **/*.less",
- "lint:types": "tsc --noEmit -p tsconfig.eslint.json",
+ "lint:types": "turbo lint:types",
"test": "turbo test -- --passWithNoTests",
"coverage": "turbo coverage -- --passWithNoTests",
"build": "turbo build",
"build:demo": "turbo build:demo",
- "build:storybook": "storybook build"
- },
- "engines": {
- "node": "^18.17.0",
- "pnpm": "^8.6.2"
+ "build:storybook": "storybook build",
+ "lint": "eslint .",
+ "lint:fix": "eslint . --fix"
},
- "author": "DreamNum Inc. <[email protected]>",
- "license": "Apache-2.0",
"devDependencies": {
+ "@antfu/eslint-config": "^2.6.3",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.4",
"@playwright/test": "^1.40.1",
@@ -37,32 +39,25 @@
"@storybook/testing-library": "^0.2.2",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
- "@typescript-eslint/eslint-plugin": "^6.17.0",
- "@typescript-eslint/parser": "^6.17.0",
+ "@typescript-eslint/parser": "^6.19.1",
"@univerjs/design": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.56.0",
- "eslint-config-airbnb-base": "^15.0.0",
- "eslint-config-airbnb-typescript": "^17.1.0",
- "eslint-config-prettier": "^9.1.0",
- "eslint-import-resolver-typescript": "^3.6.1",
- "eslint-plugin-header": "~3.1.1",
- "eslint-plugin-import-newlines": "^1.3.4",
- "eslint-plugin-prettier": "^5.1.2",
+ "eslint-plugin-header": "^3.1.1",
"eslint-plugin-react": "^7.33.2",
- "eslint-plugin-simple-import-sort": "^10.0.0",
- "eslint-plugin-unused-imports": "^3.0.0",
+ "eslint-plugin-react-hooks": "^4.6.0",
+ "eslint-plugin-react-refresh": "^0.4.5",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^7.6.7",
+ "stylelint": "^15.11.0",
"stylelint-config-clean-order": "^5.2.0",
"stylelint-config-prettier": "^9.0.5",
- "stylelint-config-standard-less": "^2.0.0",
"stylelint-config-standard": "^34.0.0",
- "stylelint": "^15.11.0",
+ "stylelint-config-standard-less": "^2.0.0",
"turbo": "^1.11.2",
"typescript": "^5.3.3"
},
diff --git a/packages/core/package.json b/packages/core/package.json
index 807839ab7b..cad99ce661 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,9 +1,20 @@
{
"name": "@univerjs/core",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "Core library for Univer.",
- "keywords": [],
"author": "DreamNum <[email protected]>",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/dream-num/univer",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dream-num/univer.git"
+ },
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -24,28 +35,22 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
- "license": "Apache-2.0",
- "homepage": "https://github.com/dream-num/univer",
- "repository": {
- "type": "git",
- "url": "https://github.com/dream-num/univer.git"
+ "peerDependencies": {
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
},
"dependencies": {
"@wendellhu/redi": "^0.12.13",
@@ -56,15 +61,12 @@
},
"devDependencies": {
"@types/numeral": "^2.0.5",
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
"vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/core/src/basics/plugin-holder.ts b/packages/core/src/basics/plugin-holder.ts
index 65ff36daa9..dfbc5f3882 100644
--- a/packages/core/src/basics/plugin-holder.ts
+++ b/packages/core/src/basics/plugin-holder.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
import type { Ctor, Injector } from '@wendellhu/redi';
import type { Plugin, PluginCtor } from '../plugin/plugin';
diff --git a/packages/core/src/basics/univer-sheet.ts b/packages/core/src/basics/univer-sheet.ts
index 26db7ecf1a..adba49c8ff 100644
--- a/packages/core/src/basics/univer-sheet.ts
+++ b/packages/core/src/basics/univer-sheet.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
import type { IDisposable } from '@wendellhu/redi';
import { Inject, Injector } from '@wendellhu/redi';
diff --git a/packages/core/src/basics/univer.ts b/packages/core/src/basics/univer.ts
index 25ae0e497c..30d2c71475 100644
--- a/packages/core/src/basics/univer.ts
+++ b/packages/core/src/basics/univer.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
import { Injector } from '@wendellhu/redi';
import type { DocumentDataModel } from '../docs/data-model/document-data-model';
diff --git a/packages/core/src/common/function.ts b/packages/core/src/common/function.ts
index d1aab2fdfd..1dc8f4f98b 100644
--- a/packages/core/src/common/function.ts
+++ b/packages/core/src/common/function.ts
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
-// eslint-disable-next-line no-magic-numbers
export function throttle<T extends (...args: any[]) => any>(fn: T, wait: number = 16): T {
let lastTime = 0;
let timer: number | null = null;
diff --git a/packages/core/src/plugin/plugin.ts b/packages/core/src/plugin/plugin.ts
index 25af066c71..74f27aa547 100644
--- a/packages/core/src/plugin/plugin.ts
+++ b/packages/core/src/plugin/plugin.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
import type { Ctor, Injector } from '@wendellhu/redi';
export type PluginCtor<T extends Plugin> = Ctor<T> & { type: PluginType };
@@ -42,7 +40,6 @@ export abstract class Plugin {
this._name = name;
}
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
onStarting(injector: Injector): void {}
onReady(): void {}
diff --git a/packages/core/src/services/command/command.service.ts b/packages/core/src/services/command/command.service.ts
index 245ee14888..19b022f383 100644
--- a/packages/core/src/services/command/command.service.ts
+++ b/packages/core/src/services/command/command.service.ts
@@ -161,7 +161,6 @@ export const ICommandService = createIdentifier<ICommandService>('anywhere.comma
* The registry of commands.
*/
export class CommandRegistry {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
private readonly _commands = new Map<string, ICommand>();
registerCommand(command: ICommand): IDisposable {
@@ -385,7 +384,7 @@ export class CommandService implements ICommandService {
try {
result = this._injector.invoke(command.handler, params) as R;
if (result instanceof Promise) {
- throw new Error('[CommandService]: Command handler should not return a promise.');
+ throw new TypeError('[CommandService]: Command handler should not return a promise.');
}
this._commandExecutingLevel--;
@@ -443,7 +442,7 @@ class MultiCommand implements IMultiCommand {
for (const item of this._implementations) {
const preconditions = item.command.preconditions;
if (!preconditions || (preconditions && preconditions(contextService))) {
- logService.debug(`[MultiCommand]`, `executing implementation "${item.command.name}".`);
+ logService.debug('[MultiCommand]', `executing implementation "${item.command.name}".`);
const result = await injector.invoke(item.command.handler, params);
if (result) {
return true;
diff --git a/packages/core/src/services/config/config.service.ts b/packages/core/src/services/config/config.service.ts
index 66c519d83c..474d6c1386 100644
--- a/packages/core/src/services/config/config.service.ts
+++ b/packages/core/src/services/config/config.service.ts
@@ -33,7 +33,6 @@ export interface IConfigService {
}
export class ConfigService implements IConfigService {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
private readonly _config: Map<string, any> = new Map();
getConfig<T>(id: string): Nullable<T> {
diff --git a/packages/core/src/services/lifecycle/lifecycle.ts b/packages/core/src/services/lifecycle/lifecycle.ts
index 405a636d56..a7ce30da07 100644
--- a/packages/core/src/services/lifecycle/lifecycle.ts
+++ b/packages/core/src/services/lifecycle/lifecycle.ts
@@ -55,7 +55,6 @@ export const LifecycleToModules = new Map<LifecycleStages, Array<DependencyIdent
* Register some modules here that will automatically run when Univer progressed to a certain lifecycle stage
*/
export function OnLifecycle(lifecycleStage: LifecycleStages, identifier: DependencyIdentifier<unknown>) {
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
const decorator = function decorator(_: Ctor<unknown>) {
runOnLifecycle(lifecycleStage, identifier);
};
diff --git a/packages/core/src/services/locale/locale.service.ts b/packages/core/src/services/locale/locale.service.ts
index a3a841a9cc..0d280cf38a 100644
--- a/packages/core/src/services/locale/locale.service.ts
+++ b/packages/core/src/services/locale/locale.service.ts
@@ -36,7 +36,6 @@ function getValue(locale: ILocales[LocaleType], key: string): Nullable<string> {
try {
if (locale[key]) return locale[key] as string;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
return key.split('.').reduce((a: any, b: string) => a[b], locale);
} catch (error) {
console.warn('Key %s not found', key);
diff --git a/packages/core/src/services/log/log.service.ts b/packages/core/src/services/log/log.service.ts
index b610aac72e..2aea0637fb 100644
--- a/packages/core/src/services/log/log.service.ts
+++ b/packages/core/src/services/log/log.service.ts
@@ -20,7 +20,7 @@ import { createIdentifier } from '@wendellhu/redi';
import { Disposable } from '../../shared/lifecycle';
-export enum LogLevel /* eslint-disable no-magic-numbers */ {
+export enum LogLevel {
SILENT = 0,
ERROR = 1,
WARN = 2,
@@ -28,7 +28,6 @@ export enum LogLevel /* eslint-disable no-magic-numbers */ {
VERBOSE = 4,
}
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
type ArgsType = any[];
export interface ILogService {
diff --git a/packages/core/src/shared/color/color.ts b/packages/core/src/shared/color/color.ts
index 6e36abcbac..8c162f3e15 100644
--- a/packages/core/src/shared/color/color.ts
+++ b/packages/core/src/shared/color/color.ts
@@ -52,7 +52,7 @@ export class ColorBuilder {
return this.asRgbColor();
}
case ColorType.UNSUPPORTED: {
- throw Error('unsupported color type');
+ throw new Error('unsupported color type');
}
}
}
@@ -118,9 +118,9 @@ export class Color {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
let string = null;
if (result) {
- const r = parseInt(result[1], 16);
- const g = parseInt(result[2], 16);
- const b = parseInt(result[3], 16);
+ const r = Number.parseInt(result[1], 16);
+ const g = Number.parseInt(result[2], 16);
+ const b = Number.parseInt(result[3], 16);
string = `rgba(${r},${g},${b})`;
}
return string;
@@ -283,10 +283,10 @@ export class RgbColor extends Color {
static RGB_COLOR_AMT: number = 0;
static RGBA_EXTRACT: RegExp = new RegExp(
- `\\s*rgba\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d.\\d|\\d\\s*)\\)\\s*`
+ '\\s*rgba\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d.\\d|\\d\\s*)\\)\\s*'
);
- static RGB_EXTRACT: RegExp = new RegExp(`\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*`);
+ static RGB_EXTRACT: RegExp = new RegExp('\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*');
private _cssString: string;
diff --git a/packages/core/src/shared/lifecycle.ts b/packages/core/src/shared/lifecycle.ts
index 2e400c9212..0ca3554a1f 100644
--- a/packages/core/src/shared/lifecycle.ts
+++ b/packages/core/src/shared/lifecycle.ts
@@ -23,11 +23,9 @@ import type { Nullable } from '../common/type-utils';
import type { Observer } from '../observer/observable';
import { isObserver } from '../observer/observable';
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function toDisposable(observer: Nullable<Observer<any>>): IDisposable;
export function toDisposable(subscription: SubscriptionLike): IDisposable;
export function toDisposable(callback: () => void): IDisposable;
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function toDisposable(v: SubscriptionLike | (() => void) | Nullable<Observer<any>>): IDisposable {
let disposed = false;
diff --git a/packages/core/src/shared/permission/index.ts b/packages/core/src/shared/permission/index.ts
index bc2552efa9..b52c07d3c9 100644
--- a/packages/core/src/shared/permission/index.ts
+++ b/packages/core/src/shared/permission/index.ts
@@ -30,5 +30,5 @@ export const getTypeFromPermissionItemList = (list: PermissionPoint[]) =>
list.some((item) => item.status === PermissionStatus.INIT)
? PermissionStatus.INIT
: list.some((item) => item.status === PermissionStatus.FETCHING)
- ? PermissionStatus.FETCHING
- : PermissionStatus.DONE;
+ ? PermissionStatus.FETCHING
+ : PermissionStatus.DONE;
diff --git a/packages/core/src/shared/rectangle.ts b/packages/core/src/shared/rectangle.ts
index f84663edf1..b99665966f 100644
--- a/packages/core/src/shared/rectangle.ts
+++ b/packages/core/src/shared/rectangle.ts
@@ -184,6 +184,7 @@ export class Rectangle {
ranges[0]
);
}
+
static getRelativeRange = (range: IRange, originRange: IRange) =>
({
startRow: range.startRow - originRange.startRow,
diff --git a/packages/core/src/sheets/range.ts b/packages/core/src/sheets/range.ts
index 18ca391a65..03d5f721e4 100644
--- a/packages/core/src/sheets/range.ts
+++ b/packages/core/src/sheets/range.ts
@@ -364,11 +364,11 @@ export class Range {
if (p && Array.isArray(p.body?.textRuns)) {
return isAllFormatInTextRuns('ul', p.body?.textRuns!) === BooleanNumber.TRUE
? {
- s: BooleanNumber.TRUE,
- }
+ s: BooleanNumber.TRUE,
+ }
: {
- s: BooleanNumber.FALSE,
- };
+ s: BooleanNumber.FALSE,
+ };
}
return this.getUnderlines()[0][0];
@@ -397,11 +397,11 @@ export class Range {
if (p && Array.isArray(p.body?.textRuns)) {
return isAllFormatInTextRuns('st', p.body?.textRuns!) === BooleanNumber.TRUE
? {
- s: BooleanNumber.TRUE,
- }
+ s: BooleanNumber.TRUE,
+ }
: {
- s: BooleanNumber.FALSE,
- };
+ s: BooleanNumber.FALSE,
+ };
}
return this.getStrikeThroughs()[0][0];
diff --git a/packages/core/src/types/enum/text-style.ts b/packages/core/src/types/enum/text-style.ts
index ae9d8be486..6bb68c25ba 100644
--- a/packages/core/src/types/enum/text-style.ts
+++ b/packages/core/src/types/enum/text-style.ts
@@ -71,31 +71,28 @@ export enum VerticalAlign {
*/
export enum WrapStrategy {
UNSPECIFIED,
+
/**
* Lines that are longer than the cell width will be written in the next cell over, so long as that cell is empty. If the next cell over is non-empty, this behaves the same as CLIP . The text will never wrap to the next line unless the user manually inserts a new line. Example:
-
-
- | First sentence. |
- | Manual newline that is very long. <- Text continues into next cell
- | Next newline. |
+ * | First sentence. |
+ * | Manual newline that is very long. <- Text continues into next cell
+ * | Next newline. |
*/
OVERFLOW,
+
/**
* Lines that are longer than the cell width will be clipped. The text will never wrap to the next line unless the user manually inserts a new line. Example:
-
-
- | First sentence. |
- | Manual newline t| <- Text is clipped
- | Next newline. |
+ * | First sentence. |
+ * | Manual newline t| <- Text is clipped
+ * | Next newline. |
*/
CLIP,
+
/**
* Words that are longer than a line are wrapped at the character level rather than clipped. Example:
-
-
- | Cell has a |
- | loooooooooo| <- Word is broken.
- | ong word. |
+ * | Cell has a |
+ * | loooooooooo| <- Word is broken.
+ * | ong word. |
*/
WRAP,
}
diff --git a/packages/core/src/types/interfaces/i-cell-data.ts b/packages/core/src/types/interfaces/i-cell-data.ts
index 7872c2a433..872f39397d 100644
--- a/packages/core/src/types/interfaces/i-cell-data.ts
+++ b/packages/core/src/types/interfaces/i-cell-data.ts
@@ -50,7 +50,6 @@ export interface ICellDataForSheetInterceptor extends ICellData {
isInArrayFormulaRange?: Nullable<boolean>;
}
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isICellData(value: any): value is ICellData {
return (
value &&
diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json
index 2c985bab3f..32af46af22 100644
--- a/packages/core/tsconfig.json
+++ b/packages/core/tsconfig.json
@@ -1,13 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib/types",
- "downlevelIteration": true,
- "esModuleInterop": true,
- "jsx": "preserve",
- "emitDecoratorMetadata": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/core/tsconfig.node.json b/packages/core/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/core/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts
index f2295be681..59cab7a779 100644
--- a/packages/core/vite.config.ts
+++ b/packages/core/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/design/package.json b/packages/design/package.json
index 3c82c45b6e..b49492395b 100644
--- a/packages/design/package.json
+++ b/packages/design/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/design",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UI component library for building exceptional Univer.",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,24 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "react": ">=16.9.0",
+ "react-dom": ">=16.9.0",
+ "rxjs": "^7.8.1"
+ },
"dependencies": {
"@rc-component/color-picker": "^1.4.1",
"@rc-component/trigger": "^1.18.2",
@@ -70,6 +76,7 @@
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@types/react-transition-group": "^4.4.10",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
@@ -77,12 +84,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "react": ">=16.9.0",
- "react-dom": ">=16.9.0",
- "rxjs": "^7.8.1"
}
}
diff --git a/packages/design/src/components/avatar/Avatar.tsx b/packages/design/src/components/avatar/Avatar.tsx
index 750d40d53c..10a4aea395 100644
--- a/packages/design/src/components/avatar/Avatar.tsx
+++ b/packages/design/src/components/avatar/Avatar.tsx
@@ -83,10 +83,10 @@ export function Avatar(props: IAvatarProps) {
const sizeStyle =
typeof size === 'number'
? {
- width: size,
- height: size,
- lineHeight: `${size}px`,
- }
+ width: size,
+ height: size,
+ lineHeight: `${size}px`,
+ }
: {};
const _className = clsx(styles.avatar, {
diff --git a/packages/design/src/components/avatar/__tests__/index.spec.tsx b/packages/design/src/components/avatar/__tests__/index.spec.tsx
index a18c2d9102..703ffe9a80 100644
--- a/packages/design/src/components/avatar/__tests__/index.spec.tsx
+++ b/packages/design/src/components/avatar/__tests__/index.spec.tsx
@@ -16,23 +16,23 @@
import { render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Avatar } from '../Avatar';
describe('Avatar', () => {
- test('renders correctly', () => {
+ it('renders correctly', () => {
const { container } = render(<Avatar size="small">Jane Doe</Avatar>);
expect(container);
});
- test('renders the children', () => {
+ it('renders the children', () => {
const { getByText } = render(<Avatar>Test</Avatar>);
const childrenElement = getByText('Test');
expect(childrenElement).not.toBeNull();
});
- test('renders the image', () => {
+ it('renders the image', () => {
const { container } = render(<Avatar src="test.png" />);
expect(container.querySelector('img')).not.toBeNull();
diff --git a/packages/design/src/components/button/__tests__/index.spec.tsx b/packages/design/src/components/button/__tests__/index.spec.tsx
index 04feff1f72..06ad7992da 100644
--- a/packages/design/src/components/button/__tests__/index.spec.tsx
+++ b/packages/design/src/components/button/__tests__/index.spec.tsx
@@ -16,17 +16,17 @@
import { fireEvent, render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Button } from '../Button';
describe('Button', () => {
- test('renders correctly', () => {
+ it('renders correctly', () => {
const { container } = render(<Button type="primary">btn1</Button>);
expect(container);
});
- test('click onClick function', () => {
+ it('click onClick function', () => {
let a = 1;
const { container } = render(
@@ -44,7 +44,7 @@ describe('Button', () => {
expect(a).toEqual(2);
});
- test('should prevent event when button is disabled', () => {
+ it('should prevent event when button is disabled', () => {
let a = 1;
const { container } = render(
diff --git a/packages/design/src/components/cascader-list/CascaderList.tsx b/packages/design/src/components/cascader-list/CascaderList.tsx
index 16d6c5cbd7..0c6f6c89a4 100644
--- a/packages/design/src/components/cascader-list/CascaderList.tsx
+++ b/packages/design/src/components/cascader-list/CascaderList.tsx
@@ -83,32 +83,34 @@ export function CascaderList(props: ICascaderListProps) {
return (
<section className={styles.cascaderList}>
{activeOptions.map((options, index) =>
- options.length ? (
- <ul key={index} className={styles.cascaderListBoard}>
- {options.map((option) => (
- <li
- key={option.value}
- className={clsx(styles.cascaderListItem, {
- [styles.cascaderListItemActive]: option.value === value[index],
- })}
- >
- <a
- className={styles.cascaderListOption}
- onClick={() => handleChange(index, option.value)}
+ options.length
+ ? (
+ <ul key={index} className={styles.cascaderListBoard}>
+ {options.map((option) => (
+ <li
+ key={option.value}
+ className={clsx(styles.cascaderListItem, {
+ [styles.cascaderListItemActive]: option.value === value[index],
+ })}
>
- <span className={styles.cascaderListCheckMark}>
- {option.value === value[index] && <CheckMarkSingle />}
- </span>
- <span>{option.label}</span>
- </a>
- </li>
- ))}
- </ul>
- ) : (
- <section key={index} className={styles.cascaderListEmpty}>
- 无
- </section>
- )
+ <a
+ className={styles.cascaderListOption}
+ onClick={() => handleChange(index, option.value)}
+ >
+ <span className={styles.cascaderListCheckMark}>
+ {option.value === value[index] && <CheckMarkSingle />}
+ </span>
+ <span>{option.label}</span>
+ </a>
+ </li>
+ ))}
+ </ul>
+ )
+ : (
+ <section key={index} className={styles.cascaderListEmpty}>
+ 无
+ </section>
+ )
)}
{value.length <= 0 && <section className={styles.cascaderListEmpty}>无</section>}
</section>
diff --git a/packages/design/src/components/checkbox-group/__tests__/index.spec.tsx b/packages/design/src/components/checkbox-group/__tests__/index.spec.tsx
index 49869118ae..20198a44d3 100644
--- a/packages/design/src/components/checkbox-group/__tests__/index.spec.tsx
+++ b/packages/design/src/components/checkbox-group/__tests__/index.spec.tsx
@@ -16,7 +16,7 @@
import { fireEvent, render } from '@testing-library/react';
import React, { useState } from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Checkbox } from '../../checkbox/Checkbox';
import { CheckboxGroup } from '../CheckboxGroup';
@@ -35,7 +35,7 @@ describe('CheckboxGroup', () => {
</CheckboxGroup>
);
- test('click Checkbox', async () => {
+ it('click Checkbox', async () => {
render(group);
let result = ['0'];
diff --git a/packages/design/src/components/checkbox/__tests__/index.spec.tsx b/packages/design/src/components/checkbox/__tests__/index.spec.tsx
index 903f67a45d..03bed94bc1 100644
--- a/packages/design/src/components/checkbox/__tests__/index.spec.tsx
+++ b/packages/design/src/components/checkbox/__tests__/index.spec.tsx
@@ -16,14 +16,14 @@
import { fireEvent, render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Checkbox } from '../Checkbox';
describe('Checkbox', () => {
const component = <Checkbox value="0">text</Checkbox>;
- test('click Checkbox', async () => {
+ it('click Checkbox', async () => {
const { container } = render(component);
fireEvent.click(container.querySelector('input')!);
diff --git a/packages/design/src/components/config-provider/__tests__/index.spec.tsx b/packages/design/src/components/config-provider/__tests__/index.spec.tsx
index c0242878c2..b379e52440 100644
--- a/packages/design/src/components/config-provider/__tests__/index.spec.tsx
+++ b/packages/design/src/components/config-provider/__tests__/index.spec.tsx
@@ -16,14 +16,14 @@
import { render } from '@testing-library/react';
import React, { useContext } from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import type { ILocale } from '../../../locale';
import { enUS, zhCN } from '../../../locale';
import { ConfigContext, ConfigProvider } from '../ConfigProvider';
describe('ConfigProvider', () => {
- test('should render correctly', () => {
+ it('should render correctly', () => {
let _mountContainer: HTMLElement | null = null;
let _locale: ILocale | null = null;
@@ -48,7 +48,7 @@ describe('ConfigProvider', () => {
root.unmount();
});
- test('should render correctly when mountContainer is not document.body', () => {
+ it('should render correctly when mountContainer is not document.body', () => {
const mountContainer = document.createElement('div');
document.body.appendChild(mountContainer);
@@ -73,7 +73,7 @@ describe('ConfigProvider', () => {
root.unmount();
});
- test('should render correctly when locale is invalid', () => {
+ it('should render correctly when locale is invalid', () => {
const mountContainer = document.createElement('div');
document.body.appendChild(mountContainer);
diff --git a/packages/design/src/components/container/__tests__/index.spec.tsx b/packages/design/src/components/container/__tests__/index.spec.tsx
index 3bd30757c5..7a7679cfe1 100644
--- a/packages/design/src/components/container/__tests__/index.spec.tsx
+++ b/packages/design/src/components/container/__tests__/index.spec.tsx
@@ -16,12 +16,12 @@
import { render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Container } from '../Container';
describe('Container', () => {
- test('should display initial Container', () => {
+ it('should display initial Container', () => {
const { container } = render(<Container>container content Text</Container>);
expect(container.textContent).toMatch('container content Text');
diff --git a/packages/design/src/components/dialog/Dialog.tsx b/packages/design/src/components/dialog/Dialog.tsx
index 0ffe188cd4..405e95cc72 100644
--- a/packages/design/src/components/dialog/Dialog.tsx
+++ b/packages/design/src/components/dialog/Dialog.tsx
@@ -77,28 +77,30 @@ export function Dialog(props: IDialogProps) {
const { mountContainer } = useContext(ConfigContext);
- const TitleIfDraggable = draggable ? (
- <div
- style={{
- width: '100%',
- cursor: 'pointer',
- }}
- onMouseOver={() => {
- if (dragDisabled) {
- setDragDisabled(false);
- }
- }}
- onMouseOut={() => {
- setDragDisabled(true);
- }}
- onFocus={() => {}}
- onBlur={() => {}}
- >
- {title}
- </div>
- ) : (
- title
- );
+ const TitleIfDraggable = draggable
+ ? (
+ <div
+ style={{
+ width: '100%',
+ cursor: 'pointer',
+ }}
+ onMouseOver={() => {
+ if (dragDisabled) {
+ setDragDisabled(false);
+ }
+ }}
+ onMouseOut={() => {
+ setDragDisabled(true);
+ }}
+ onFocus={() => {}}
+ onBlur={() => {}}
+ >
+ {title}
+ </div>
+ )
+ : (
+ title
+ );
const modalRender = (modal: React.ReactNode) =>
draggable ? <Draggable disabled={dragDisabled}>{modal}</Draggable> : modal;
diff --git a/packages/design/src/components/icon/Icon.stories.tsx b/packages/design/src/components/icon/Icon.stories.tsx
index cc541c1b0d..4787851d7d 100644
--- a/packages/design/src/components/icon/Icon.stories.tsx
+++ b/packages/design/src/components/icon/Icon.stories.tsx
@@ -32,14 +32,14 @@ export default meta;
export const Playground = {
render() {
function handleRedirect() {
- window.open('https://univer-icons.vercel.app/', '_blank');
+ window.open('https://univer.ai/icons', '_blank');
}
return (
<>
- Check out our icon library at{' '}
+ Check out our icon library at
<Button type="link" onClick={handleRedirect}>
- https://univer-icons.vercel.app/
+ https://univer.ai/icons
</Button>
</>
);
diff --git a/packages/design/src/components/message/__tests__/index.spec.tsx b/packages/design/src/components/message/__tests__/index.spec.tsx
index 77ca20b31d..5b824dd81c 100644
--- a/packages/design/src/components/message/__tests__/index.spec.tsx
+++ b/packages/design/src/components/message/__tests__/index.spec.tsx
@@ -16,13 +16,13 @@
import { fireEvent, render, screen } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Button } from '../../button/Button';
import { Message } from '../Message';
describe('Message', () => {
- test('renders correctly', () => {
+ it('renders correctly', () => {
const message = new Message(document.body);
const { container } = render(
diff --git a/packages/design/src/components/radio-group/__tests__/index.spec.tsx b/packages/design/src/components/radio-group/__tests__/index.spec.tsx
index aa2532f55d..9cf6d6ab7e 100644
--- a/packages/design/src/components/radio-group/__tests__/index.spec.tsx
+++ b/packages/design/src/components/radio-group/__tests__/index.spec.tsx
@@ -16,7 +16,7 @@
import { fireEvent, render, screen } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Radio } from '../../radio/Radio';
import { RadioGroup } from '../RadioGroup';
@@ -35,7 +35,7 @@ describe('RadioGroup', () => {
</RadioGroup>
);
- test('click Radio', async () => {
+ it('click Radio', async () => {
render(group);
fireEvent.click(screen.getByText('1'));
diff --git a/packages/design/src/components/radio/__tests__/index.spec.tsx b/packages/design/src/components/radio/__tests__/index.spec.tsx
index dafc4d2586..fd3020a164 100644
--- a/packages/design/src/components/radio/__tests__/index.spec.tsx
+++ b/packages/design/src/components/radio/__tests__/index.spec.tsx
@@ -16,14 +16,14 @@
import { fireEvent, render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Radio } from '../Radio';
describe('Radio', () => {
const component = <Radio value="0">text</Radio>;
- test('click Radio', async () => {
+ it('click Radio', async () => {
const { container } = render(component);
fireEvent.click(container.querySelector('input')!);
diff --git a/packages/design/src/components/scrollbar/__tests__/index.spec.tsx b/packages/design/src/components/scrollbar/__tests__/index.spec.tsx
index 051ce20935..cfc8081804 100644
--- a/packages/design/src/components/scrollbar/__tests__/index.spec.tsx
+++ b/packages/design/src/components/scrollbar/__tests__/index.spec.tsx
@@ -16,12 +16,12 @@
import { render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Scrollbar } from '../Scrollbar';
describe('Scrollbar', () => {
- test('should not render thumb', () => {
+ it('should not render thumb', () => {
const { container } = render(
<section style={{ height: '100px' }}>
<Scrollbar>
diff --git a/packages/design/src/components/select/Select.stories.tsx b/packages/design/src/components/select/Select.stories.tsx
index 9f84a6c1fd..0534432ac3 100644
--- a/packages/design/src/components/select/Select.stories.tsx
+++ b/packages/design/src/components/select/Select.stories.tsx
@@ -71,7 +71,8 @@ export const SelectGroup = {
{
label: (
<span>
- Option 3-2 <strong>xxx</strong>
+ Option 3-2
+ <strong>xxx</strong>
</span>
),
value: 'option32',
diff --git a/packages/design/src/components/slider/Slider.tsx b/packages/design/src/components/slider/Slider.tsx
index 982242321e..27601aa71c 100644
--- a/packages/design/src/components/slider/Slider.tsx
+++ b/packages/design/src/components/slider/Slider.tsx
@@ -34,7 +34,8 @@ export interface ISliderProps {
*/
min?: number;
- /** The maximum value the slider can slide to
+ /**
+ * The maximum value the slider can slide to
* @default 400
*/
max?: number;
@@ -45,7 +46,8 @@ export interface ISliderProps {
*/
disabled?: boolean;
- /** The maximum value the slider can slide to
+ /**
+ * The maximum value the slider can slide to
* @default 100
*/
resetPoint?: number;
@@ -176,7 +178,7 @@ export function Slider(props: ISliderProps) {
<Dropdown
placement="topLeft"
- overlay={
+ overlay={(
<div className={styles.sliderShortcuts}>
{shortcuts?.map((item) => (
<a
@@ -188,13 +190,19 @@ export function Slider(props: ISliderProps) {
onClick={() => onChange && onChange(item)}
>
{item === value && <span className={styles.sliderShortcutIcon}>✔</span>}
- <span>{item}%</span>
+ <span>
+ {item}
+ %
+ </span>
</a>
))}
</div>
- }
+ )}
>
- <a className={styles.sliderValue}>{value}%</a>
+ <a className={styles.sliderValue}>
+ {value}
+ %
+ </a>
</Dropdown>
</div>
);
diff --git a/packages/design/src/components/slider/__test__/index.spec.tsx b/packages/design/src/components/slider/__test__/index.spec.tsx
index 7752762df7..d812d491d0 100644
--- a/packages/design/src/components/slider/__test__/index.spec.tsx
+++ b/packages/design/src/components/slider/__test__/index.spec.tsx
@@ -16,17 +16,17 @@
import { fireEvent, render, screen } from '@testing-library/react';
import React, { useState } from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Slider } from '../Slider';
describe('Slider', () => {
- test('renders correctly', () => {
+ it('renders correctly', () => {
const { container } = render(<Slider min={0} max={100} value={90} />);
expect(container);
});
- test('renders correctly with resetPoint', () => {
+ it('renders correctly with resetPoint', () => {
let value = 90;
function handleChange(point: number) {
@@ -40,7 +40,7 @@ describe('Slider', () => {
expect(value).toBe(30);
});
- test('renders correctly with steps', () => {
+ it('renders correctly with steps', () => {
let result = 10;
function Demo() {
const [value, setValue] = useState(result);
@@ -66,7 +66,7 @@ describe('Slider', () => {
expect(result).toBe(20);
});
- test('renders correctly with shortcuts', () => {
+ it('renders correctly with shortcuts', () => {
let result = 10;
function Demo() {
const [value, setValue] = useState(result);
diff --git a/packages/design/src/components/tree/__tests__/index.spec.tsx b/packages/design/src/components/tree/__tests__/index.spec.tsx
index 1bbdea4b6c..4c180b2c81 100644
--- a/packages/design/src/components/tree/__tests__/index.spec.tsx
+++ b/packages/design/src/components/tree/__tests__/index.spec.tsx
@@ -16,12 +16,12 @@
import { render } from '@testing-library/react';
import React from 'react';
-import { describe, expect, test } from 'vitest';
+import { describe, expect, it } from 'vitest';
import { Tree } from '../Tree';
describe('Tree', () => {
- test('defaultExpandAll', async () => {
+ it('defaultExpandAll', async () => {
const { container } = render(
<Tree
data={[
diff --git a/packages/design/src/hooks/observable.ts b/packages/design/src/hooks/observable.ts
index 2aeb4d70e4..46e321e076 100644
--- a/packages/design/src/hooks/observable.ts
+++ b/packages/design/src/hooks/observable.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
import type React from 'react';
import { useEffect, useRef, useState } from 'react';
import type { Observable, Subscription } from 'rxjs';
diff --git a/packages/design/tsconfig.json b/packages/design/tsconfig.json
index fce974769c..32af46af22 100644
--- a/packages/design/tsconfig.json
+++ b/packages/design/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false,
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/design/tsconfig.node.json b/packages/design/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/design/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/design/vite.config.ts b/packages/design/vite.config.ts
index 8dd4081c40..0be97fc56e 100644
--- a/packages/design/vite.config.ts
+++ b/packages/design/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/docs-ui/package.json b/packages/docs-ui/package.json
index 16c09ed217..737bdd8f48 100644
--- a/packages/docs-ui/package.json
+++ b/packages/docs-ui/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/docs-ui",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "Univer normal ui-plugin-docs",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,28 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/docs": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -58,6 +68,7 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
@@ -65,16 +76,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0"
}
}
diff --git a/packages/docs-ui/tsconfig.json b/packages/docs-ui/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/docs-ui/tsconfig.json
+++ b/packages/docs-ui/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/docs-ui/tsconfig.node.json b/packages/docs-ui/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/docs-ui/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/docs-ui/vite.config.ts b/packages/docs-ui/vite.config.ts
index c14da86ad4..e0ede451fb 100644
--- a/packages/docs-ui/vite.config.ts
+++ b/packages/docs-ui/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 9c567db7c4..504ca08d99 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/docs",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal base-docs",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,27 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/engine-render": "workspace:*",
@@ -51,21 +60,13 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/docs/src/commands/commands/inline-format.command.ts b/packages/docs/src/commands/commands/inline-format.command.ts
index 2d597850a5..1fd1006361 100644
--- a/packages/docs/src/commands/commands/inline-format.command.ts
+++ b/packages/docs/src/commands/commands/inline-format.command.ts
@@ -26,7 +26,7 @@ import {
IUniverInstanceService,
MemoryCursor,
} from '@univerjs/core';
-import { type TextRange } from '@univerjs/engine-render';
+import type { TextRange } from '@univerjs/engine-render';
import { TextSelectionManagerService } from '../../services/text-selection-manager.service';
import type { IRichTextEditingMutationParams } from '../mutations/core-editing.mutation';
@@ -337,8 +337,8 @@ function getReverseFormatValueInSelection(
return /bl|it/.test(key)
? BooleanNumber.FALSE
: /ul|st/.test(key)
- ? {
+ ? {
s: BooleanNumber.FALSE,
}
- : BaselineOffset.NORMAL;
+ : BaselineOffset.NORMAL;
}
diff --git a/packages/docs/src/commands/commands/list.command.ts b/packages/docs/src/commands/commands/list.command.ts
index 38cc5076f8..bb4fa11dd8 100644
--- a/packages/docs/src/commands/commands/list.command.ts
+++ b/packages/docs/src/commands/commands/list.command.ts
@@ -149,23 +149,23 @@ export const ListOperationCommand: ICommand<IListOperationCommandParams> = {
paragraphs: [
isAlreadyOrdered
? {
- paragraphStyle,
- startIndex: 0,
- }
+ paragraphStyle,
+ startIndex: 0,
+ }
: {
- ...paragraph,
- startIndex: 0,
- bullet: {
- ...(paragraph.bullet ?? {
- nestingLevel: 0,
- textStyle: {
- fs: 20,
- },
- }),
- listType,
- listId,
- },
- },
+ ...paragraph,
+ startIndex: 0,
+ bullet: {
+ ...(paragraph.bullet ?? {
+ nestingLevel: 0,
+ textStyle: {
+ fs: 20,
+ },
+ }),
+ listType,
+ listId,
+ },
+ },
],
},
segmentId,
diff --git a/packages/docs/src/controllers/move-cursor.controller.ts b/packages/docs/src/controllers/move-cursor.controller.ts
index 5f2873d99e..9febae7d09 100644
--- a/packages/docs/src/controllers/move-cursor.controller.ts
+++ b/packages/docs/src/controllers/move-cursor.controller.ts
@@ -108,8 +108,8 @@ export class MoveCursorController extends Disposable {
const { startOffset, endOffset, style, collapsed, direction: rangeDirection } = activeRange;
if (allRanges.length > 1) {
- let min = Infinity;
- let max = -Infinity;
+ let min = Number.POSITIVE_INFINITY;
+ let max = Number.NEGATIVE_INFINITY;
for (const range of allRanges) {
min = Math.min(min, range.startOffset!);
@@ -130,11 +130,11 @@ export class MoveCursorController extends Disposable {
const anchorOffset = collapsed
? startOffset
: rangeDirection === RANGE_DIRECTION.FORWARD
- ? startOffset
- : endOffset;
+ ? startOffset
+ : endOffset;
let focusOffset = collapsed ? endOffset : rangeDirection === RANGE_DIRECTION.FORWARD ? endOffset : startOffset;
- const dataStreamLength = docDataModel.getBody()!.dataStream.length ?? Infinity;
+ const dataStreamLength = docDataModel.getBody()!.dataStream.length ?? Number.POSITIVE_INFINITY;
if (direction === Direction.LEFT || direction === Direction.RIGHT) {
const preSpan = skeleton.findNodeByCharIndex(focusOffset - 1);
@@ -208,14 +208,14 @@ export class MoveCursorController extends Disposable {
const { startOffset, endOffset, style, collapsed } = activeRange;
- const dataStreamLength = docDataModel.getBody()!.dataStream.length ?? Infinity;
+ const dataStreamLength = docDataModel.getBody()!.dataStream.length ?? Number.POSITIVE_INFINITY;
if (direction === Direction.LEFT || direction === Direction.RIGHT) {
let cursor;
if (!activeRange.collapsed || allRanges.length > 1) {
- let min = Infinity;
- let max = -Infinity;
+ let min = Number.POSITIVE_INFINITY;
+ let max = Number.NEGATIVE_INFINITY;
for (const range of allRanges) {
min = Math.min(min, range.startOffset!);
@@ -323,7 +323,7 @@ export class MoveCursorController extends Disposable {
const divide = span.parent;
if (divide == null) {
- return -Infinity;
+ return Number.NEGATIVE_INFINITY;
}
const divideLeft = divide.left;
@@ -340,7 +340,7 @@ export class MoveCursorController extends Disposable {
span?: IDocumentSkeletonSpan;
distance: number;
} = {
- distance: Infinity,
+ distance: Number.POSITIVE_INFINITY,
};
for (const divide of line.divides) {
diff --git a/packages/docs/tsconfig.json b/packages/docs/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/docs/tsconfig.json
+++ b/packages/docs/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/docs/tsconfig.node.json b/packages/docs/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/docs/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/docs/vite.config.ts b/packages/docs/vite.config.ts
index 8a6884f614..1ff084acd7 100644
--- a/packages/docs/vite.config.ts
+++ b/packages/docs/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/engine-formula/package.json b/packages/engine-formula/package.json
index f0d33d3554..e1dbe67dfa 100644
--- a/packages/engine-formula/package.json
+++ b/packages/engine-formula/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/engine-formula",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal base-formula-engine",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,24 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@wendellhu/redi": "^0.12.13",
@@ -50,17 +56,12 @@
},
"devDependencies": {
"@types/big.js": "^6.2.2",
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/engine-formula/src/controller/register-function.controller.ts b/packages/engine-formula/src/controller/register-function.controller.ts
index 989301ba0f..35b1c64c42 100644
--- a/packages/engine-formula/src/controller/register-function.controller.ts
+++ b/packages/engine-formula/src/controller/register-function.controller.ts
@@ -85,7 +85,7 @@ class CustomFunction extends BaseFunction {
function createFunction(functionString: string, functionName: string) {
const instance = new CustomFunction(functionName);
- // eslint-disable-next-line @typescript-eslint/no-implied-eval
+ // eslint-disable-next-line no-new-func
const functionCalculate = new Function(`return ${functionString}`)();
instance.calculateCustom = functionCalculate;
diff --git a/packages/engine-formula/src/engine/value-object/base-value-object.ts b/packages/engine-formula/src/engine/value-object/base-value-object.ts
index 491e69ba4c..ad475b9b26 100644
--- a/packages/engine-formula/src/engine/value-object/base-value-object.ts
+++ b/packages/engine-formula/src/engine/value-object/base-value-object.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-unused-vars */
-
import { ConcatenateType } from '../../basics/common';
import { ErrorType } from '../../basics/error-type';
import { ObjectClassType } from '../../basics/object-class-type';
diff --git a/packages/engine-formula/src/functions/math/sumif/index.ts b/packages/engine-formula/src/functions/math/sumif/index.ts
index 990eccce16..a8635c9a94 100644
--- a/packages/engine-formula/src/functions/math/sumif/index.ts
+++ b/packages/engine-formula/src/functions/math/sumif/index.ts
@@ -16,7 +16,7 @@
import { ErrorType } from '../../../basics/error-type';
import { valueObjectCompare } from '../../../engine/utils/object-compare';
-import { type ArrayValueObject } from '../../../engine/value-object/array-value-object';
+import type { ArrayValueObject } from '../../../engine/value-object/array-value-object';
import { type BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
import { BaseFunction } from '../../base-function';
@@ -43,9 +43,9 @@ export class Sumif extends BaseFunction {
// sumRange has the same dimensions as range
const sumRangeArray = sumRange
? (sumRange as ArrayValueObject).slice(
- [0, (range as ArrayValueObject).getRowCount()],
- [0, (range as ArrayValueObject).getColumnCount()]
- )
+ [0, (range as ArrayValueObject).getRowCount()],
+ [0, (range as ArrayValueObject).getColumnCount()]
+ )
: (range as ArrayValueObject);
if (!sumRangeArray) {
diff --git a/packages/engine-formula/tsconfig.json b/packages/engine-formula/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/engine-formula/tsconfig.json
+++ b/packages/engine-formula/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/engine-formula/tsconfig.node.json b/packages/engine-formula/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/engine-formula/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/engine-formula/vite.config.ts b/packages/engine-formula/vite.config.ts
index d74de3ab31..0ae850c119 100644
--- a/packages/engine-formula/vite.config.ts
+++ b/packages/engine-formula/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
@@ -31,7 +31,7 @@ export default defineConfig(({ mode }) => ({
external: [
'@univerjs/core',
'@wendellhu/redi',
- 'rxjs'
+ 'rxjs',
],
output: {
globals: {
diff --git a/packages/engine-numfmt/package.json b/packages/engine-numfmt/package.json
index f90cf0a787..6e0741e0fa 100644
--- a/packages/engine-numfmt/package.json
+++ b/packages/engine-numfmt/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/engine-numfmt",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal plugin UI manager",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,36 +30,32 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"numfmt": "^2.5.2"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*"
}
}
diff --git a/packages/engine-numfmt/tsconfig.json b/packages/engine-numfmt/tsconfig.json
index 7a89f85b12..32af46af22 100644
--- a/packages/engine-numfmt/tsconfig.json
+++ b/packages/engine-numfmt/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "types": ["./src/types/index.d.ts"]
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/engine-numfmt/tsconfig.node.json b/packages/engine-numfmt/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/engine-numfmt/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/engine-numfmt/vite.config.ts b/packages/engine-numfmt/vite.config.ts
index 30103a2c67..96359e0bb4 100644
--- a/packages/engine-numfmt/vite.config.ts
+++ b/packages/engine-numfmt/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/engine-render/package.json b/packages/engine-render/package.json
index 754abd85e4..60651bd85f 100644
--- a/packages/engine-render/package.json
+++ b/packages/engine-render/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/engine-render",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal base-render",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,24 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@wendellhu/redi": "^0.12.13",
@@ -50,17 +56,12 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/engine-render/src/base-object.ts b/packages/engine-render/src/base-object.ts
index 756fd46c75..ec380b3dc3 100644
--- a/packages/engine-render/src/base-object.ts
+++ b/packages/engine-render/src/base-object.ts
@@ -222,7 +222,6 @@ export abstract class BaseObject {
}
get parent() {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this._parent;
}
@@ -529,7 +528,6 @@ export abstract class BaseObject {
}
getParent() {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this._parent;
}
diff --git a/packages/engine-render/src/basics/i-events.ts b/packages/engine-render/src/basics/i-events.ts
index 5a36b87e72..713fddd635 100644
--- a/packages/engine-render/src/basics/i-events.ts
+++ b/packages/engine-render/src/basics/i-events.ts
@@ -57,8 +57,8 @@ type Primitive = undefined | null | boolean | string | number | Function;
export type Immutable<T> = T extends Primitive
? T
: T extends Array<infer U>
- ? readonly U[]
- : DeepImmutable<T>; /* T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : // es2015+ only */
+ ? readonly U[]
+ : DeepImmutable<T>; /* T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : // es2015+ only */
/**
* Type modifier to make all the properties of an object Readonly recursively
@@ -66,8 +66,8 @@ export type Immutable<T> = T extends Primitive
export type DeepImmutable<T> = T extends Primitive
? T
: T extends Array<infer U>
- ? IDeepImmutableArray<U>
- : /* T extends Map<infer K, infer V> ? DeepImmutableMap<K, V> : // es2015+ only */
+ ? IDeepImmutableArray<U>
+ : /* T extends Map<infer K, infer V> ? DeepImmutableMap<K, V> : // es2015+ only */
DeepImmutableObject<T>;
/**
diff --git a/packages/engine-render/src/components/docs/block/paragraph/layout-ruler.ts b/packages/engine-render/src/components/docs/block/paragraph/layout-ruler.ts
index 9d452ca835..61e6056b0e 100644
--- a/packages/engine-render/src/components/docs/block/paragraph/layout-ruler.ts
+++ b/packages/engine-render/src/components/docs/block/paragraph/layout-ruler.ts
@@ -35,7 +35,7 @@ import {
createSkeletonLine,
setDivideFullState,
} from '../../common/line';
-// eslint-disable-next-line import/no-cycle
+
import { createSkeletonPage } from '../../common/page';
import { setColumnFullState } from '../../common/section';
import { addSpanToDivide, createSkeletonBulletSpan, hasMixedTextLayout } from '../../common/span';
@@ -697,7 +697,7 @@ function __getSpanGroupWidth(spanGroup: IDocumentSkeletonSpan[]) {
function __maxFontBoundingBoxBySpanGroup(spanGroup: IDocumentSkeletonSpan[]) {
const spanGroupLen = spanGroup.length;
- let height = -Infinity;
+ let height = Number.NEGATIVE_INFINITY;
let maxBox;
for (let i = 0; i < spanGroupLen; i++) {
diff --git a/packages/engine-render/src/components/docs/block/paragraph/paragraph.ts b/packages/engine-render/src/components/docs/block/paragraph/paragraph.ts
index 8238165e0c..030a482768 100644
--- a/packages/engine-render/src/components/docs/block/paragraph/paragraph.ts
+++ b/packages/engine-render/src/components/docs/block/paragraph/paragraph.ts
@@ -34,7 +34,7 @@ import type {
} from '../../../../basics/i-document-skeleton-cached';
import { BreakType } from '../../../../basics/i-document-skeleton-cached';
import type { IParagraphConfig, ISectionBreakConfig } from '../../../../basics/interfaces';
-// eslint-disable-next-line import/no-cycle
+
import { createSkeletonPage } from '../../common/page';
import { setColumnFullState } from '../../common/section';
import { createSkeletonLetterSpan, createSkeletonTabSpan } from '../../common/span';
@@ -68,8 +68,8 @@ export function dealWidthParagraph(
defaultTabStop = 10.5,
pageSize = {
- width: Infinity,
- height: Infinity,
+ width: Number.POSITIVE_INFINITY,
+ height: Number.POSITIVE_INFINITY,
},
marginRight = 0,
@@ -447,7 +447,7 @@ function horizontalAlignHandler(line: IDocumentSkeletonLine, horizontalAlign: Ho
const { width } = divide;
const spanGroupWidth = getSpanGroupWidth(divide);
- if (width === Infinity) {
+ if (width === Number.POSITIVE_INFINITY) {
continue;
}
if (horizontalAlign === HorizontalAlign.CENTER) {
diff --git a/packages/engine-render/src/components/docs/block/section.ts b/packages/engine-render/src/components/docs/block/section.ts
index 78f4b07dfe..02da1b3c84 100644
--- a/packages/engine-render/src/components/docs/block/section.ts
+++ b/packages/engine-render/src/components/docs/block/section.ts
@@ -21,7 +21,7 @@ import type { ISectionBreakConfig } from '../../../basics/interfaces';
import type { DataStreamTreeNode } from '../view-model/data-stream-tree-node';
import type { DocumentViewModel } from '../view-model/document-view-model';
import { dealWithBlockError } from './block-error';
-// eslint-disable-next-line import/no-cycle
+
import { dealWidthParagraph } from './paragraph';
export function dealWithSections(
diff --git a/packages/engine-render/src/components/docs/common/page.ts b/packages/engine-render/src/components/docs/common/page.ts
index ac2b56548c..d6caad361a 100644
--- a/packages/engine-render/src/components/docs/common/page.ts
+++ b/packages/engine-render/src/components/docs/common/page.ts
@@ -25,7 +25,7 @@ import type {
} from '../../../basics/i-document-skeleton-cached';
import { BreakType } from '../../../basics/i-document-skeleton-cached';
import type { ISectionBreakConfig } from '../../../basics/interfaces';
-// eslint-disable-next-line import/no-cycle
+
import { dealWithSections } from '../block/section';
import type { DocumentViewModel } from '../view-model/document-view-model';
import { createSkeletonSection } from './section';
@@ -33,7 +33,7 @@ import { updateBlockIndex } from './tools';
// 新增数据结构框架
// 判断奇数和偶数页码
-// eslint-disable-next-line max-lines-per-function
+
export function createSkeletonPage(
sectionBreakConfig: ISectionBreakConfig,
skeletonResourceReference: ISkeletonResourceReference,
@@ -44,7 +44,7 @@ export function createSkeletonPage(
const {
pageNumberStart = 1,
- pageSize = { width: Infinity, height: Infinity },
+ pageSize = { width: Number.POSITIVE_INFINITY, height: Number.POSITIVE_INFINITY },
pageOrient = PageOrientType.PORTRAIT,
headerIds = {},
footerIds = {},
@@ -65,7 +65,7 @@ export function createSkeletonPage(
const { skeHeaders, skeFooters } = skeletonResourceReference;
- const { width: pageWidth = Infinity, height: pageHeight = Infinity } = pageSize;
+ const { width: pageWidth = Number.POSITIVE_INFINITY, height: pageHeight = Number.POSITIVE_INFINITY } = pageSize;
page.pageNumber = pageNumber;
page.pageNumberStart = pageNumberStart;
@@ -199,14 +199,14 @@ function _createSkeletonHeader(
marginHeader = 0,
marginFooter = 0,
} = sectionBreakConfig;
- const pageWidth = pageSize?.width || Infinity;
+ const pageWidth = pageSize?.width || Number.POSITIVE_INFINITY;
const headerConfig: ISectionBreakConfig = {
lists,
footerTreeMap,
headerTreeMap,
pageSize: {
width: pageWidth - marginLeft - marginRight,
- height: Infinity,
+ height: Number.POSITIVE_INFINITY,
},
localeService,
drawings,
diff --git a/packages/engine-render/src/components/docs/linebreak/__tests__/linebreak.spec.ts b/packages/engine-render/src/components/docs/linebreak/__tests__/linebreak.spec.ts
index 0a041fff36..51805583c7 100644
--- a/packages/engine-render/src/components/docs/linebreak/__tests__/linebreak.spec.ts
+++ b/packages/engine-render/src/components/docs/linebreak/__tests__/linebreak.spec.ts
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-/* eslint-disable no-magic-numbers */
-
-import fs from 'fs';
+import fs from 'node:fs';
import { describe, expect, it } from 'vitest';
import { tabLineBreakExtension } from '../extensions/tab-linebreak-extension';
@@ -37,7 +35,7 @@ describe('unicode line break tests', () => {
return lines.forEach((line, i) => {
const rowNumber = i + 1;
let bk;
- if (!line || /^#/.test(line)) {
+ if (!line || line.startsWith('#')) {
return;
}
@@ -45,7 +43,7 @@ describe('unicode line break tests', () => {
const codePoints = cols
.split(/\s*[×÷]\s*/)
.slice(1, -1)
- .map((c) => parseInt(c, 16));
+ .map((c) => Number.parseInt(c, 16));
const str = String.fromCodePoint(...codePoints);
const breaker = new LineBreaker(str);
@@ -64,7 +62,7 @@ describe('unicode line break tests', () => {
if (codes[0] === '') {
codes.shift();
}
- codes = codes.map((c) => parseInt(c, 16));
+ codes = codes.map((c) => Number.parseInt(c, 16));
return String.fromCodePoint(...codes);
});
diff --git a/packages/engine-render/src/components/docs/linebreak/linebreaker.ts b/packages/engine-render/src/components/docs/linebreak/linebreaker.ts
index 5c9009ce07..27acfdf2f0 100644
--- a/packages/engine-render/src/components/docs/linebreak/linebreaker.ts
+++ b/packages/engine-render/src/components/docs/linebreak/linebreaker.ts
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/naming-convention */
-/* eslint-disable no-magic-numbers */
-
import type { Nullable } from '@univerjs/core';
import { Break } from './break';
@@ -142,9 +139,9 @@ export class LineBreaker {
const next = this.string.charCodeAt(this._pos);
// If a surrogate pair
- if (code >= 0xd800 && code <= 0xdbff && next >= 0xdc00 && next <= 0xdfff) {
+ if (code >= 0xD800 && code <= 0xDBFF && next >= 0xDC00 && next <= 0xDFFF) {
this._pos++;
- return (code - 0xd800) * 0x400 + (next - 0xdc00) + 0x10000;
+ return (code - 0xD800) * 0x400 + (next - 0xDC00) + 0x10000;
}
return code;
diff --git a/packages/engine-render/src/components/docs/linebreak/tiny-inflate.ts b/packages/engine-render/src/components/docs/linebreak/tiny-inflate.ts
index 44a929468f..e346478eff 100644
--- a/packages/engine-render/src/components/docs/linebreak/tiny-inflate.ts
+++ b/packages/engine-render/src/components/docs/linebreak/tiny-inflate.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable no-magic-numbers */
-
const TINF_OK = 0;
const TINF_DATA_ERROR = -3;
@@ -170,7 +168,7 @@ function tinf_read_bits(d: Data, num: number, base: number) {
d.bitcount += 8;
}
- const val = d.tag & (0xffff >>> (16 - num));
+ const val = d.tag & (0xFFFF >>> (16 - num));
d.tag >>>= num;
d.bitcount -= num;
return val + base;
@@ -232,7 +230,7 @@ function tinf_decode_trees(d: Data, lt: Tree, dt: Tree) {
tinf_build_tree(code_tree, lengths, 0, 19);
/* decode code lengths for the dynamic trees */
- for (num = 0; num < hlit + hdist; ) {
+ for (num = 0; num < hlit + hdist;) {
const sym = tinf_decode_symbol(d, code_tree);
switch (sym) {
@@ -327,7 +325,7 @@ function tinf_inflate_uncompressed_block(d: Data) {
invlength = 256 * invlength + d.source[d.sourceIndex + 2];
/* check length */
- if (length !== (~invlength & 0x0000ffff)) return TINF_DATA_ERROR;
+ if (length !== (~invlength & 0x0000FFFF)) return TINF_DATA_ERROR;
d.sourceIndex += 4;
diff --git a/packages/engine-render/src/components/sheets/sheet-component.ts b/packages/engine-render/src/components/sheets/sheet-component.ts
index 97c6a7b751..01320aa1a9 100644
--- a/packages/engine-render/src/components/sheets/sheet-component.ts
+++ b/packages/engine-render/src/components/sheets/sheet-component.ts
@@ -80,12 +80,7 @@ export class SheetComponent extends RenderComponent<SpreadsheetSkeleton, SHEET_E
startColumn: number,
endRow: number,
endColumn: number
- ): Nullable<{
- startRow: number;
- startColumn: number;
- endRow: number;
- endColumn: number;
- }> {}
+ ): Nullable<{ startRow: number; startColumn: number; endRow: number; endColumn: number }> {}
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportBound) {
/* abstract */
diff --git a/packages/engine-render/src/context.ts b/packages/engine-render/src/context.ts
index b7a9de306e..1fa5a34399 100644
--- a/packages/engine-render/src/context.ts
+++ b/packages/engine-render/src/context.ts
@@ -272,25 +272,17 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* reset canvas context transform
-
* @method
-
*/
-
reset() {
this._context.reset();
}
/**
-
* arc function.
-
* @method
-
*/
-
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterClockwise?: boolean) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -300,15 +292,10 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* arcTo function.
-
* @method
-
*
-
*/
-
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number) {
const { scaleX, scaleY } = this._getScale();
x1 = fixLineWidthByScale(x1, scaleX);
@@ -320,25 +307,17 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* beginPath function.
-
* @method
-
*/
-
beginPath() {
this._context.beginPath();
}
/**
-
* bezierCurveTo function.
-
* @method
-
*/
-
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -352,13 +331,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* clearRect function.
-
* @method
-
*/
-
clearRect(x: number, y: number, width: number, height: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -370,11 +345,8 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* clip function.
-
* @method
-
*/
clip(): void;
@@ -389,25 +361,17 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* closePath function.
-
* @method
-
*/
-
closePath() {
this._context.closePath();
}
/**
-
* createImageData function.
-
* @method
-
*/
-
createImageData(width: number, height: number, settings?: ImageDataSettings): ImageData;
createImageData(imagedata: ImageData): ImageData;
@@ -426,49 +390,33 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* createLinearGradient function.
-
* @method
-
*/
-
createLinearGradient(x0: number, y0: number, x1: number, y1: number) {
return this._context.createLinearGradient(x0, y0, x1, y1);
}
/**
-
* createPattern function.
-
* @method
-
*/
-
createPattern(image: CanvasImageSource, repetition: string | null) {
return this._context.createPattern(image, repetition);
}
/**
-
* createRadialGradient function.
-
* @method
-
*/
-
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number) {
return this._context.createRadialGradient(x0, y0, r0, x1, y1, r1);
}
/**
-
* drawImage function.
-
* @method
-
*/
-
drawImage(
image: CanvasImageSource,
@@ -506,13 +454,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* ellipse function.
-
* @method
-
*/
-
ellipse(
x: number,
@@ -534,13 +478,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* isPointInPath function.
-
* @method
-
*/
-
isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
@@ -550,13 +490,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* fill function.
-
* @method
-
*/
-
fill(fillRule?: CanvasFillRule): void;
fill(path: Path2D, fillRule?: CanvasFillRule): void;
@@ -568,13 +504,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* fillRect function.
-
* @method
-
*/
-
fillRect(x: number, y: number, width: number, height: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -586,13 +518,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* strokeRect function.
-
* @method
-
*/
-
strokeRect(x: number, y: number, width: number, height: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -604,13 +532,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* fillText function.
-
* @method
-
*/
-
fillText(text: string, x: number, y: number, maxWidth?: number) {
// const { scaleX, scaleY } = this._getScale();
// x = fixLineWidthByScale(x, scaleX);
@@ -626,13 +550,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* fillText function.
-
* @method
-
*/
-
fillTextPrecision(text: string, x: number, y: number, maxWidth?: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -648,37 +568,25 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* measureText function.
-
* @method
-
*/
-
measureText(text: string) {
return this._context.measureText(text);
}
/**
-
* getImageData function.
-
* @method
-
*/
-
getImageData(sx: number, sy: number, sw: number, sh: number) {
return this._context.getImageData(sx, sy, sw, sh);
}
/**
-
* lineTo function.
-
* @method
-
*/
-
lineTo(x: number, y: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -688,13 +596,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* moveTo function.
-
* @method
-
*/
-
moveTo(x: number, y: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -704,13 +608,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* rect function.
-
* @method
-
*/
-
rect(x: number, y: number, width: number, height: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -722,85 +622,57 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* putImageData function.
-
* @method
-
*/
-
putImageData(imageData: ImageData, dx: number, dy: number) {
this._context.putImageData(imageData, dx, dy);
}
/**
-
* quadraticCurveTo function.
-
* @method
-
*/
-
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number) {
this._context.quadraticCurveTo(cpx, cpy, x, y);
}
/**
-
* restore function.
-
* @method
-
*/
-
restore() {
this._context.restore();
}
/**
-
* rotate function.
-
* @method
-
*/
-
rotate(angle: number) {
this._context.rotate(angle);
}
/**
-
* save function.
-
* @method
-
*/
-
save() {
this._context.save();
}
/**
-
* scale function.
-
* @method
-
*/
-
scale(x: number, y: number) {
this._context.scale(x, y);
}
/**
-
* setLineDash function.
-
* @method
-
*/
-
setLineDash(segments: number[]) {
// works for Chrome and IE11
@@ -809,36 +681,28 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
} else if ('mozDash' in this._context) {
// verified that this works in firefox
- (<any>this._context.mozDash) = segments;
+ (<any> this._context.mozDash) = segments;
} else if ('webkitLineDash' in this._context) {
// does not currently work for Safari
- (<any>this._context.webkitLineDash) = segments;
+ (<any> this._context.webkitLineDash) = segments;
}
// no support for IE9 and IE10
}
/**
-
* getLineDash function.
-
* @method
-
*/
-
getLineDash() {
return this._context.getLineDash();
}
/**
-
* setTransform function.
-
* @method
-
*/
-
setTransform(transform?: DOMMatrix2DInit): void;
setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
@@ -848,13 +712,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* stroke function.
-
* @method
-
*/
-
stroke(path2d?: Path2D) {
if (path2d) {
this._context.stroke(path2d);
@@ -864,13 +724,9 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* strokeText function.
-
* @method
-
*/
-
strokeText(text: string, x: number, y: number, maxWidth?: number) {
const { scaleX, scaleY } = this._getScale();
x = fixLineWidthByScale(x, scaleX);
@@ -883,25 +739,17 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
}
/**
-
* transform function.
-
* @method
-
*/
-
transform(a: number, b: number, c: number, d: number, e: number, f: number) {
this._context.transform(a, b, c, d, e, f);
}
/**
-
* translate function.
-
* @method
-
*/
-
translate(x: number, y: number) {
// const { scaleX, scaleY } = this._getScale();
// x = fixLineWidthByScale(x, scaleX);
diff --git a/packages/engine-render/src/engine.ts b/packages/engine-render/src/engine.ts
index d41f395586..56d5f8a059 100644
--- a/packages/engine-render/src/engine.ts
+++ b/packages/engine-render/src/engine.ts
@@ -367,7 +367,6 @@ export class Engine extends ThinEngine<Scene> {
this._canvasEle.addEventListener('keyup', keyboardUpEvent);
}
- // eslint-disable-next-line max-lines-per-function
private _handlePointerAction() {
const eventPrefix = getPointerPrefix();
@@ -621,8 +620,8 @@ export class Engine extends ThinEngine<Scene> {
'onwheel' in document.createElement('div')
? 'wheel' // Modern browsers support "wheel"
: (document as any).onmousewheel !== undefined
- ? 'mousewheel' // Webkit and IE support at least "mousewheel"
- : 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox
+ ? 'mousewheel' // Webkit and IE support at least "mousewheel"
+ : 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox
return wheelEventName;
}
diff --git a/packages/engine-render/tsconfig.json b/packages/engine-render/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/engine-render/tsconfig.json
+++ b/packages/engine-render/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/engine-render/tsconfig.node.json b/packages/engine-render/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/engine-render/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/engine-render/vite.config.ts b/packages/engine-render/vite.config.ts
index 539cf0507b..0ae850c119 100644
--- a/packages/engine-render/vite.config.ts
+++ b/packages/engine-render/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/facade/package.json b/packages/facade/package.json
index 0f9fd8edf1..def757d4a9 100644
--- a/packages/facade/package.json
+++ b/packages/facade/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/facade",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,48 +30,44 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
- "dependencies": {
+ "peerDependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/sheets": "workspace:*",
- "@univerjs/engine-formula": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
+ "@wendellhu/redi": ">=0.12.13",
+ "rxjs": ">=7.0.0"
+ },
+ "dependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-formula": "workspace:*",
"@univerjs/network": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-formula": "workspace:*",
+ "@univerjs/sheets-numfmt": "workspace:*",
"@wendellhu/redi": "^0.12.13",
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
- "typescript": "^5.3.3",
"happy-dom": "^12.10.3",
+ "typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-formula": "workspace:*",
- "@univerjs/sheets-numfmt": "workspace:*",
- "@wendellhu/redi": ">=0.12.13",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/facade/tsconfig.json b/packages/facade/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/facade/tsconfig.json
+++ b/packages/facade/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/facade/tsconfig.node.json b/packages/facade/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/facade/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/facade/vite.config.ts b/packages/facade/vite.config.ts
index 0241e5bc66..1b74064fc8 100644
--- a/packages/facade/vite.config.ts
+++ b/packages/facade/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
@@ -28,19 +28,26 @@ export default defineConfig(({ mode }) => ({
fileName: (format) => `${format}/index.js`,
formats: ['es', 'umd', 'cjs'],
},
+
rollupOptions: {
external: [
'@univerjs/core',
+ '@univerjs/engine-formula',
+ '@univerjs/network',
'@univerjs/sheets',
'@univerjs/sheets-formula',
+ '@univerjs/sheets-numfmt',
'@wendellhu/redi',
- 'rxjs'
+ 'rxjs',
],
output: {
globals: {
'@univerjs/core': 'UniverCore',
+ '@univerjs/engine-formula': 'UniverEngineFormula',
+ '@univerjs/network': 'UniverNetwork',
'@univerjs/sheets': 'UniverSheets',
'@univerjs/sheets-formula': 'UniverSheetsFormula',
+ '@univerjs/sheets-numfmt': 'UniverSheetsNumfmt',
'@wendellhu/redi': '@wendellhu/redi',
rxjs: 'rxjs',
},
diff --git a/packages/find-replace/package.json b/packages/find-replace/package.json
index f821e06aa5..6832c76826 100644
--- a/packages/find-replace/package.json
+++ b/packages/find-replace/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/find-replace",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,29 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/icons": "^0.1.26",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.13",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -53,21 +64,11 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/icons": "^0.1.26",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.13",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/find-replace/tsconfig.json b/packages/find-replace/tsconfig.json
index fce974769c..32af46af22 100644
--- a/packages/find-replace/tsconfig.json
+++ b/packages/find-replace/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false,
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/find-replace/tsconfig.node.json b/packages/find-replace/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/find-replace/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/find-replace/vite.config.ts b/packages/find-replace/vite.config.ts
index 10fa72578c..d551f895b4 100644
--- a/packages/find-replace/vite.config.ts
+++ b/packages/find-replace/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
diff --git a/packages/image/package.json b/packages/image/package.json
index 4e87c08e37..5f783971c2 100644
--- a/packages/image/package.json
+++ b/packages/image/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/image",
"version": "0.1.0-beta.2",
+ "private": true,
"description": "",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,18 +30,22 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": true,
"scripts": {},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/engine-render": "workspace:*",
@@ -46,22 +55,13 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"react": "^18.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/image/tsconfig.json b/packages/image/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/image/tsconfig.json
+++ b/packages/image/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/image/tsconfig.node.json b/packages/image/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/image/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/image/vite.config.ts b/packages/image/vite.config.ts
index 656adf1331..3dc6aa9e76 100644
--- a/packages/image/vite.config.ts
+++ b/packages/image/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/network/package.json b/packages/network/package.json
index 192d261ace..9957ab435f 100644
--- a/packages/network/package.json
+++ b/packages/network/package.json
@@ -1,9 +1,14 @@
{
"name": "@univerjs/network",
"version": "0.1.0-beta.2",
- "keywords": [],
+ "private": false,
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -24,35 +29,31 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@wendellhu/redi": "^0.12.13",
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/network/src/services/http/http.service.ts b/packages/network/src/services/http/http.service.ts
index c747f66573..28e6ffbb28 100644
--- a/packages/network/src/services/http/http.service.ts
+++ b/packages/network/src/services/http/http.service.ts
@@ -31,7 +31,6 @@ import type { HTTPEvent, HTTPResponseError } from './response';
import { HTTPResponse } from './response';
export interface IRequestParams {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
body?: any;
/** Query params. These params would be append to the url before the request is sent. */
params?: { [param: string]: string | number | boolean };
@@ -41,7 +40,6 @@ export interface IRequestParams {
}
export interface IPostRequestParams extends IRequestParams {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
body?: any;
}
@@ -59,7 +57,6 @@ export interface IHTTPInterceptor {
export class HTTPService extends Disposable {
private _interceptors: IHTTPInterceptor[] = [];
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
private _pipe: Nullable<RequestPipe<any>>;
constructor(@IHTTPImplementation private readonly _http: IHTTPImplementation) {
diff --git a/packages/network/src/services/http/implementations/implementation.ts b/packages/network/src/services/http/implementations/implementation.ts
index 68aa3ebe37..919c514390 100644
--- a/packages/network/src/services/http/implementations/implementation.ts
+++ b/packages/network/src/services/http/implementations/implementation.ts
@@ -24,7 +24,6 @@ import type { HTTPEvent } from '../response';
* HTTP service could be implemented differently on platforms.
*/
export interface IHTTPImplementation {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
// There may be stream response so the return value is an observable.
send(request: HTTPRequest): Observable<HTTPEvent<any>>;
}
diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/network/tsconfig.json
+++ b/packages/network/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/network/tsconfig.node.json b/packages/network/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/network/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/network/vite.config.ts b/packages/network/vite.config.ts
index e148ff5a5a..fb3930fabd 100644
--- a/packages/network/vite.config.ts
+++ b/packages/network/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
@@ -17,7 +17,7 @@ export default defineConfig(({ mode }) => ({
}),
],
define: {
- // 'process.env.NODE_ENV': JSON.stringify(mode),
+ 'process.env.NODE_ENV': JSON.stringify(mode),
},
build: {
outDir: 'lib',
diff --git a/packages/rpc/package.json b/packages/rpc/package.json
index 3646ab330d..81dd785981 100644
--- a/packages/rpc/package.json
+++ b/packages/rpc/package.json
@@ -1,9 +1,14 @@
{
"name": "@univerjs/rpc",
"version": "0.1.0-beta.2",
- "keywords": [],
+ "private": false,
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -24,36 +29,32 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@wendellhu/redi": "^0.12.13",
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/rpc/src/services/rpc/__tests__/rpc.service.spec.ts b/packages/rpc/src/services/rpc/__tests__/rpc.service.spec.ts
index d47cd03513..5baf3ac7a9 100644
--- a/packages/rpc/src/services/rpc/__tests__/rpc.service.spec.ts
+++ b/packages/rpc/src/services/rpc/__tests__/rpc.service.spec.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
import type { Observable } from 'rxjs';
import { of, Subject } from 'rxjs';
import { beforeEach, describe, expect, it } from 'vitest';
diff --git a/packages/rpc/src/services/rpc/rpc.service.ts b/packages/rpc/src/services/rpc/rpc.service.ts
index 09aa02a1f3..8511e50b83 100644
--- a/packages/rpc/src/services/rpc/rpc.service.ts
+++ b/packages/rpc/src/services/rpc/rpc.service.ts
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable @typescript-eslint/no-explicit-any */
-/* eslint-disable no-magic-numbers */
-
import { RxDisposable } from '@univerjs/core';
import type { Subscriber, Subscription } from 'rxjs';
import { BehaviorSubject, firstValueFrom, isObservable, Observable, of } from 'rxjs';
@@ -96,7 +93,6 @@ export function toModule<T extends object>(channel: IChannel): T {
return undefined;
}
- // eslint-disable-next-line func-names
return function (...args: any[]) {
const isObservable = propertyIsEventSource(propKey);
if (isObservable) {
diff --git a/packages/rpc/tsconfig.json b/packages/rpc/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/rpc/tsconfig.json
+++ b/packages/rpc/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/rpc/tsconfig.node.json b/packages/rpc/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/rpc/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/rpc/vite.config.ts b/packages/rpc/vite.config.ts
index 18af38debe..583644c357 100644
--- a/packages/rpc/vite.config.ts
+++ b/packages/rpc/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/sheets-find-replace/package.json b/packages/sheets-find-replace/package.json
index 527f2d640c..7191e1d579 100644
--- a/packages/sheets-find-replace/package.json
+++ b/packages/sheets-find-replace/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/sheets-find-replace",
"version": "0.1.0-beta.2",
+ "private": true,
"description": "UniverSheet find replace plugin",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,30 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": true,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/find-replace": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -59,24 +71,13 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/find-replace": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0"
}
}
diff --git a/packages/sheets-find-replace/tsconfig.json b/packages/sheets-find-replace/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-find-replace/tsconfig.json
+++ b/packages/sheets-find-replace/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-find-replace/tsconfig.node.json b/packages/sheets-find-replace/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-find-replace/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-find-replace/vite.config.ts b/packages/sheets-find-replace/vite.config.ts
index 00c4f043ad..95d537042e 100644
--- a/packages/sheets-find-replace/vite.config.ts
+++ b/packages/sheets-find-replace/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets-formula/package.json b/packages/sheets-formula/package.json
index 38a94b9deb..31cdfee8cf 100644
--- a/packages/sheets-formula/package.json
+++ b/packages/sheets-formula/package.json
@@ -1,8 +1,16 @@
{
"name": "@univerjs/sheets-formula",
"version": "0.1.0-beta.2",
+ "private": false,
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -24,23 +32,29 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/docs": "workspace:*",
+ "@univerjs/engine-formula": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -57,6 +71,7 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
@@ -64,20 +79,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
- "@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/sheets-formula/src/controllers/utils/redo-undo-formula-data.ts b/packages/sheets-formula/src/controllers/utils/redo-undo-formula-data.ts
index 00017e5417..6519253ec2 100644
--- a/packages/sheets-formula/src/controllers/utils/redo-undo-formula-data.ts
+++ b/packages/sheets-formula/src/controllers/utils/redo-undo-formula-data.ts
@@ -48,8 +48,9 @@ export function handleRedoUndoMoveRange(
checkFormulaDataNull(arrayFormulaRange, unitId, toSubUnitId) ||
checkFormulaDataNull(arrayFormulaCellData, unitId, fromSubUnitId) ||
checkFormulaDataNull(arrayFormulaCellData, unitId, toSubUnitId)
- )
+ ) {
return;
+ }
const fromValueMatrix = new ObjectMatrix(fromValue);
const toValueMatrix = new ObjectMatrix(toValue);
diff --git a/packages/sheets-formula/src/views/more-functions/function-help/FunctionHelp.tsx b/packages/sheets-formula/src/views/more-functions/function-help/FunctionHelp.tsx
index 479be12c5d..a52612bec5 100644
--- a/packages/sheets-formula/src/views/more-functions/function-help/FunctionHelp.tsx
+++ b/packages/sheets-formula/src/views/more-functions/function-help/FunctionHelp.tsx
@@ -26,7 +26,10 @@ export function FunctionHelp(props: IFunctionHelpProps) {
const { prefix, value } = props;
return (
<div>
- <span>{prefix}(</span>
+ <span>
+ {prefix}
+ (
+ </span>
{value &&
value.map((item: IFunctionParam, i: number) => (
<span key={i}>
diff --git a/packages/sheets-formula/src/views/more-functions/input-params/InputParams.tsx b/packages/sheets-formula/src/views/more-functions/input-params/InputParams.tsx
index 3f9ed3fd6b..98e244bfcf 100644
--- a/packages/sheets-formula/src/views/more-functions/input-params/InputParams.tsx
+++ b/packages/sheets-formula/src/views/more-functions/input-params/InputParams.tsx
@@ -72,13 +72,9 @@ export function InputParams(props: IInputParamsProps) {
<div className={styles.formulaInputParamsInfo}>
<FunctionParams
- title={
- activeIndex === -1 ? (
- <FunctionHelp prefix={functionInfo.functionName} value={functionParameter} />
- ) : (
- functionParameter[activeIndex].name
- )
- }
+ title={activeIndex === -1
+ ? <FunctionHelp prefix={functionInfo.functionName} value={functionParameter} />
+ : functionParameter[activeIndex].name}
value={activeIndex === -1 ? functionInfo.description : functionParameter[activeIndex].detail}
/>
</div>
diff --git a/packages/sheets-formula/src/views/prompt/help-function/HelpFunction.tsx b/packages/sheets-formula/src/views/prompt/help-function/HelpFunction.tsx
index 61c47d7071..f6a4c88ee7 100644
--- a/packages/sheets-formula/src/views/prompt/help-function/HelpFunction.tsx
+++ b/packages/sheets-formula/src/views/prompt/help-function/HelpFunction.tsx
@@ -84,53 +84,55 @@ export function HelpFunction() {
return (
<>
- {helpVisible ? (
- <Popup visible={visible} offset={offset}>
- {functionInfo ? (
- <div className={styles.formulaHelpFunction}>
- <div className={styles.formulaHelpFunctionTitle}>
- <Help
- prefix={functionInfo.functionName}
- value={functionInfo.functionParameter}
- active={paramIndex}
- onClick={handleSwitchActive}
- />
- <div className={styles.formulaHelpFunctionTitleIcons}>
- <div
- className={styles.formulaHelpFunctionTitleIcon}
- style={{ transform: contentVisible ? 'rotateZ(-90deg)' : 'rotateZ(90deg)' }}
- onClick={() => setContentVisible(!contentVisible)}
- >
- <MoreSingle />
+ {helpVisible
+ ? (
+ <Popup visible={visible} offset={offset}>
+ {functionInfo
+ ? (
+ <div className={styles.formulaHelpFunction}>
+ <div className={styles.formulaHelpFunctionTitle}>
+ <Help
+ prefix={functionInfo.functionName}
+ value={functionInfo.functionParameter}
+ active={paramIndex}
+ onClick={handleSwitchActive}
+ />
+ <div className={styles.formulaHelpFunctionTitleIcons}>
+ <div
+ className={styles.formulaHelpFunctionTitleIcon}
+ style={{ transform: contentVisible ? 'rotateZ(-90deg)' : 'rotateZ(90deg)' }}
+ onClick={() => setContentVisible(!contentVisible)}
+ >
+ <MoreSingle />
+ </div>
+ <div
+ className={styles.formulaHelpFunctionTitleIcon}
+ onClick={() => setHelpVisible(!helpVisible)}
+ >
+ <CloseSingle />
+ </div>
+ </div>
</div>
+
<div
- className={styles.formulaHelpFunctionTitleIcon}
- onClick={() => setHelpVisible(!helpVisible)}
+ className={styles.formulaHelpFunctionContent}
+ style={{
+ height: contentVisible ? 'unset' : 0,
+ padding: contentVisible ? 'revert-layer' : 0,
+ }}
>
- <CloseSingle />
- </div>
- </div>
- </div>
-
- <div
- className={styles.formulaHelpFunctionContent}
- style={{
- height: contentVisible ? 'unset' : 0,
- padding: contentVisible ? 'revert-layer' : 0,
- }}
- >
- <div className={styles.formulaHelpFunctionContentInner}>
- <Params
- title={localeService.t('formula.prompt.helpExample')}
- value={`${functionInfo.functionName}(${functionInfo.functionParameter
- .map((item) => item.example)
- .join(',')})`}
- />
- <Params
- title={localeService.t('formula.prompt.helpAbstract')}
- value={functionInfo.description}
- />
- {functionInfo &&
+ <div className={styles.formulaHelpFunctionContentInner}>
+ <Params
+ title={localeService.t('formula.prompt.helpExample')}
+ value={`${functionInfo.functionName}(${functionInfo.functionParameter
+ .map((item) => item.example)
+ .join(',')})`}
+ />
+ <Params
+ title={localeService.t('formula.prompt.helpAbstract')}
+ value={functionInfo.description}
+ />
+ {functionInfo &&
functionInfo.functionParameter &&
functionInfo.functionParameter.map((item: IFunctionParam, i: number) => (
<Params
@@ -140,24 +142,28 @@ export function HelpFunction() {
value={`${item.require ? required : optional} ${item.detail}`}
/>
))}
+ </div>
+ </div>
</div>
- </div>
+ )
+ : (
+ <></>
+ )}
+ </Popup>
+ )
+ : visible
+ ? (
+ <div
+ className={styles.formulaHelpDecorator}
+ onClick={() => setHelpVisible(!helpVisible)}
+ style={{ left: decoratorPosition.left - 24, top: decoratorPosition.top }}
+ >
+ <DetailsSingle />
</div>
- ) : (
+ )
+ : (
<></>
)}
- </Popup>
- ) : visible ? (
- <div
- className={styles.formulaHelpDecorator}
- onClick={() => setHelpVisible(!helpVisible)}
- style={{ left: decoratorPosition.left - 24, top: decoratorPosition.top }}
- >
- <DetailsSingle />
- </div>
- ) : (
- <></>
- )}
</>
);
}
@@ -186,7 +192,10 @@ const Help = (props: IHelpProps) => {
const { prefix, value, active, onClick } = props;
return (
<div>
- <span>{prefix}(</span>
+ <span>
+ {prefix}
+ (
+ </span>
{value &&
value.map((item: IFunctionParam, i: number) => (
// TODO@Dushusir: more params needs to be active
diff --git a/packages/sheets-formula/tsconfig.json b/packages/sheets-formula/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-formula/tsconfig.json
+++ b/packages/sheets-formula/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-formula/tsconfig.node.json b/packages/sheets-formula/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-formula/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-formula/vite.config.ts b/packages/sheets-formula/vite.config.ts
index f76bac543b..99452ee3a4 100644
--- a/packages/sheets-formula/vite.config.ts
+++ b/packages/sheets-formula/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets-import-xlsx/package.json b/packages/sheets-import-xlsx/package.json
index 85d8f67574..c542b5107f 100644
--- a/packages/sheets-import-xlsx/package.json
+++ b/packages/sheets-import-xlsx/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/sheets-import-xlsx",
"version": "0.1.0-beta.2",
+ "private": true,
"description": "UniverSheet normal sheets-plugin-import-xlsx",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,21 +34,22 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": true,
"scripts": {},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/engine-render": "workspace:*",
@@ -51,21 +60,12 @@
"react": "^18.2.0"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0"
}
}
diff --git a/packages/sheets-import-xlsx/tsconfig.json b/packages/sheets-import-xlsx/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-import-xlsx/tsconfig.json
+++ b/packages/sheets-import-xlsx/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-import-xlsx/tsconfig.node.json b/packages/sheets-import-xlsx/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-import-xlsx/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-import-xlsx/vite.config.ts b/packages/sheets-import-xlsx/vite.config.ts
index e1c8a92535..1bc7e4774e 100644
--- a/packages/sheets-import-xlsx/vite.config.ts
+++ b/packages/sheets-import-xlsx/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets-numfmt/package.json b/packages/sheets-numfmt/package.json
index 53a7ca2024..664c06c1d4 100644
--- a/packages/sheets-numfmt/package.json
+++ b/packages/sheets-numfmt/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/sheets-numfmt",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet numfmt plugin",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,31 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/engine-numfmt": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -61,25 +74,13 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/engine-numfmt": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/sheets-numfmt/src/components/currency/index.tsx b/packages/sheets-numfmt/src/components/currency/index.tsx
index c30fae80d7..b4542226d3 100644
--- a/packages/sheets-numfmt/src/components/currency/index.tsx
+++ b/packages/sheets-numfmt/src/components/currency/index.tsx
@@ -79,13 +79,15 @@ export const CurrencyPanel: FC<IBusinessComponentProps> = (props) => {
</div>
</div>
<div className="option">
- <div className="label"> {t('sheet.numfmt.currencyType')}</div>
+ <div className="label">{t('sheet.numfmt.currencyType')}</div>
<div className="m-t-8 w-140">
<Select onChange={onSelect} options={options} value={suffix} />
</div>
</div>
</div>
- <div className="m-t-16 label"> {t('sheet.numfmt.negType')}</div>
+ <div className="m-t-16 label">
+ {t('sheet.numfmt.negType')}
+ </div>
<div className="m-t-8">
<SelectList onChange={onChange} options={negativeOptions} value={pattern} />
diff --git a/packages/sheets-numfmt/src/components/thousandth-percentile/index.tsx b/packages/sheets-numfmt/src/components/thousandth-percentile/index.tsx
index 41b5df8498..5614ea1b58 100644
--- a/packages/sheets-numfmt/src/components/thousandth-percentile/index.tsx
+++ b/packages/sheets-numfmt/src/components/thousandth-percentile/index.tsx
@@ -71,7 +71,10 @@ export const ThousandthPercentilePanel: FC<IBusinessComponentProps> = (props) =>
onChange={handleDecimalChange}
/>
</div>
- <div className="m-t-16 label"> {localeService.t('sheet.numfmt.negType')}</div>
+ <div className="m-t-16 label">
+ {' '}
+ {localeService.t('sheet.numfmt.negType')}
+ </div>
<div className="m-t-8">
<SelectList onChange={handleClick} options={options} value={suffix} />
</div>
diff --git a/packages/sheets-numfmt/src/controllers/numfmt.controller.ts b/packages/sheets-numfmt/src/controllers/numfmt.controller.ts
index f5b4bb02e6..24f9a1a26c 100644
--- a/packages/sheets-numfmt/src/controllers/numfmt.controller.ts
+++ b/packages/sheets-numfmt/src/controllers/numfmt.controller.ts
@@ -120,7 +120,7 @@ export class NumfmtController extends Disposable implements INumfmtController {
if (numfmtValue) {
pattern = numfmtValue.pattern;
}
- // eslint-disable-next-line no-magic-numbers
+
const defaultValue = (cellValue?.t === CellValueType.NUMBER ? cellValue.v : 12345678) as number;
const props: ISheetNumfmtPanelProps = {
@@ -156,7 +156,6 @@ export class NumfmtController extends Disposable implements INumfmtController {
header: { title: localeService.t('sheet.numfmt.title') },
children: {
label: SHEET_NUMFMT_PLUGIN,
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
...(props as any), // need passthrough to react props.
},
onClose: () => {
diff --git a/packages/sheets-numfmt/tsconfig.json b/packages/sheets-numfmt/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-numfmt/tsconfig.json
+++ b/packages/sheets-numfmt/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-numfmt/tsconfig.node.json b/packages/sheets-numfmt/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-numfmt/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-numfmt/vite.config.ts b/packages/sheets-numfmt/vite.config.ts
index f8b24f2f91..61f19fe2c7 100644
--- a/packages/sheets-numfmt/vite.config.ts
+++ b/packages/sheets-numfmt/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets-ui/package.json b/packages/sheets-ui/package.json
index 7f36297492..26c734769c 100644
--- a/packages/sheets-ui/package.json
+++ b/packages/sheets-ui/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/sheets-ui",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal ui-plugin-sheets",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,36 +34,43 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/docs": "workspace:*",
+ "@univerjs/engine-formula": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/infra": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "clsx": ">=2.0.0",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
"@univerjs/docs": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
+ "@univerjs/engine-numfmt": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/icons": "^0.1.26",
"@univerjs/sheets": "workspace:*",
"@univerjs/ui": "workspace:*",
- "@univerjs/engine-numfmt": "workspace:*",
"@wendellhu/redi": "^0.12.13",
"clsx": "^2.0.0",
"react": "^18.2.0",
@@ -70,20 +85,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
- "@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "clsx": ">=2.0.0",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/sheets-ui/src/commands/commands/set-selection.command.ts b/packages/sheets-ui/src/commands/commands/set-selection.command.ts
index 00fce112fd..c322292b89 100644
--- a/packages/sheets-ui/src/commands/commands/set-selection.command.ts
+++ b/packages/sheets-ui/src/commands/commands/set-selection.command.ts
@@ -294,14 +294,14 @@ export const ExpandSelectionCommand: ICommand<IExpandSelectionCommandParams> = {
? expandToNextGapRange(startRange, direction, currentWorksheet)
: expandToNextCell(startRange, direction, currentWorksheet)
: jumpOver === JumpOver.moveGap
- ? shrinkToNextGapRange(
+ ? shrinkToNextGapRange(
startRange,
// TODO: should fix on SelectionManagerService's side
{ ...Rectangle.clone(primary), rangeType: RANGE_TYPE.NORMAL },
direction,
currentWorksheet
)
- : shrinkToNextCell(startRange, direction, currentWorksheet);
+ : shrinkToNextCell(startRange, direction, currentWorksheet);
if (Rectangle.equals(destRange, startRange)) {
return false;
diff --git a/packages/sheets-ui/src/commands/commands/utils/selection-utils.ts b/packages/sheets-ui/src/commands/commands/utils/selection-utils.ts
index 6e83299492..1eab7e6776 100644
--- a/packages/sheets-ui/src/commands/commands/utils/selection-utils.ts
+++ b/packages/sheets-ui/src/commands/commands/utils/selection-utils.ts
@@ -566,10 +566,7 @@ function rangeHasValue(
col: number,
rowEnd: number,
colEnd: number
-): {
- hasValue: boolean;
- matrix: ObjectMatrix<ICellData & { rowSpan?: number; colSpan?: number }>;
-} {
+): { hasValue: boolean; matrix: ObjectMatrix<ICellData & { rowSpan?: number; colSpan?: number }> } {
let hasValue = false;
const matrix = worksheet.getMatrixWithMergedCells(row, col, rowEnd, colEnd).forValue((_, __, value) => {
diff --git a/packages/sheets-ui/src/common/utils.ts b/packages/sheets-ui/src/common/utils.ts
index 12f5f7ab73..f1dbcec704 100644
--- a/packages/sheets-ui/src/common/utils.ts
+++ b/packages/sheets-ui/src/common/utils.ts
@@ -43,10 +43,7 @@ export function getClearContentMutationParamsForRanges(
unitId: string,
worksheet: Worksheet,
ranges: IRange[]
-): {
- undos: IMutationInfo[];
- redos: IMutationInfo[];
-} {
+): { undos: IMutationInfo[]; redos: IMutationInfo[] } {
const undos: IMutationInfo[] = [];
const redos: IMutationInfo[] = [];
diff --git a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts
index d96fc998ca..445785c0e3 100644
--- a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts
+++ b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts
@@ -269,7 +269,7 @@ export class SheetClipboardController extends Disposable {
const key = textTrim(css.substr(0, css.indexOf(':')));
const value = textTrim(css.substr(css.indexOf(':') + 1));
if (key === 'height') {
- height = parseFloat(value);
+ height = Number.parseFloat(value);
return true;
}
return false;
@@ -309,7 +309,7 @@ export class SheetClipboardController extends Disposable {
const key = textTrim(css.substr(0, css.indexOf(':')));
const value = textTrim(css.substr(css.indexOf(':') + 1));
if (key === 'height') {
- height = parseFloat(value);
+ height = Number.parseFloat(value);
return true;
}
return false;
@@ -468,9 +468,9 @@ export class SheetClipboardController extends Disposable {
data: ObjectMatrix<ICellDataWithSpanInfo>,
payload: ICopyPastePayload
): {
- redos: IMutationInfo[];
- undos: IMutationInfo[];
- } {
+ redos: IMutationInfo[];
+ undos: IMutationInfo[];
+ } {
const accessor = {
get: this._injector.get.bind(this._injector),
};
diff --git a/packages/sheets-ui/src/controllers/freeze.controller.ts b/packages/sheets-ui/src/controllers/freeze.controller.ts
index 1c79adecf8..d156b3dd76 100644
--- a/packages/sheets-ui/src/controllers/freeze.controller.ts
+++ b/packages/sheets-ui/src/controllers/freeze.controller.ts
@@ -442,7 +442,7 @@ export class FreezeController extends Disposable {
scene.disableEvent();
const lastRow = this._getCurrentLastVisibleRow();
- const lastRowY = lastRow === undefined ? Infinity : skeleton.rowHeightAccumulation[lastRow];
+ const lastRowY = lastRow === undefined ? Number.POSITIVE_INFINITY : skeleton.rowHeightAccumulation[lastRow];
this._activeViewport = null;
const oldFreeze = this._getFreeze();
@@ -954,15 +954,15 @@ export class FreezeController extends Disposable {
this._commandService.executeCommand(ScrollCommand.id, {
...(resetScroll & ResetScrollType.X
? {
- sheetViewStartColumn: 0,
- offsetX: 0,
- }
+ sheetViewStartColumn: 0,
+ offsetX: 0,
+ }
: null),
...(resetScroll & ResetScrollType.Y
? {
- sheetViewStartRow: 0,
- offsetY: 0,
- }
+ sheetViewStartRow: 0,
+ offsetY: 0,
+ }
: null),
});
}
diff --git a/packages/sheets-ui/src/services/auto-fill/auto-fill.service.ts b/packages/sheets-ui/src/services/auto-fill/auto-fill.service.ts
index 2ba97d3680..65db1dddbf 100644
--- a/packages/sheets-ui/src/services/auto-fill/auto-fill.service.ts
+++ b/packages/sheets-ui/src/services/auto-fill/auto-fill.service.ts
@@ -116,6 +116,7 @@ export class AutoFillService extends Disposable implements IAutoFillService {
disable: false,
},
]);
+
readonly menu$ = this._menu$.asObservable();
constructor(
@Inject(SheetInterceptorService) private _sheetInterceptorService: SheetInterceptorService,
diff --git a/packages/sheets-ui/src/services/clipboard/clipboard.service.ts b/packages/sheets-ui/src/services/clipboard/clipboard.service.ts
index f04042adb8..a704c5a6c0 100644
--- a/packages/sheets-ui/src/services/clipboard/clipboard.service.ts
+++ b/packages/sheets-ui/src/services/clipboard/clipboard.service.ts
@@ -459,10 +459,10 @@ export class SheetClipboardService extends Disposable implements ISheetClipboard
const pasteFrom = source
? {
- unitId: source.unitId,
- subUnitId: source.subUnitId,
- range: source.range,
- }
+ unitId: source.unitId,
+ subUnitId: source.subUnitId,
+ range: source.range,
+ }
: null;
const payload = {
@@ -822,7 +822,7 @@ function getCellTextForClipboard(cell: ICellDataWithSpanInfo) {
export const escapeSpecialCode = (cellStr: string) =>
cellStr
.replace(/&/g, '&amp;')
- .replace(/\ufeff/g, '')
+ .replace(/\uFEFF/g, '')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
diff --git a/packages/sheets-ui/src/services/clipboard/html-to-usm/converter.ts b/packages/sheets-ui/src/services/clipboard/html-to-usm/converter.ts
index a17c30aacf..5bceb9a838 100644
--- a/packages/sheets-ui/src/services/clipboard/html-to-usm/converter.ts
+++ b/packages/sheets-ui/src/services/clipboard/html-to-usm/converter.ts
@@ -479,7 +479,7 @@ function decodeHTMLEntities(input: string): string {
'&gt;': '>',
'&amp;': '&',
'&quot;': '"',
- '&#39;': "'",
+ '&#39;': '\'',
'&nbsp;': ' ',
};
diff --git a/packages/sheets-ui/src/services/selection/selection-render.service.ts b/packages/sheets-ui/src/services/selection/selection-render.service.ts
index 5c2e338eb2..505318afb4 100644
--- a/packages/sheets-ui/src/services/selection/selection-render.service.ts
+++ b/packages/sheets-ui/src/services/selection/selection-render.service.ts
@@ -114,6 +114,7 @@ export class SelectionRenderService implements ISelectionRenderService {
private _controlFillConfig$: BehaviorSubject<IControlFillConfig | null> =
new BehaviorSubject<IControlFillConfig | null>(null);
+
readonly controlFillConfig$ = this._controlFillConfig$.asObservable();
private _selectionControls: SelectionShape[] = []; // sheetID:Controls
@@ -147,7 +148,7 @@ export class SelectionRenderService implements ISelectionRenderService {
private _isHeaderHighlight: boolean = true;
// If true, the selector will respond to the range of merged cells and automatically extend the selected range. If false, it will ignore the merged cells.
- private _isDetectMergedCell: Boolean = true;
+ private _isDetectMergedCell: boolean = true;
// The style of the selection area, including dashed lines, color, thickness, autofill, other points for modifying the range of the selection area, title highlighting, and so on, can all be customized.
private _selectionStyle!: ISelectionStyle;
@@ -1013,9 +1014,9 @@ export class SelectionRenderService implements ISelectionRenderService {
const { rowHeaderWidth, columnHeaderHeight } = skeleton;
if (rangeType === RANGE_TYPE.ROW) {
- moveOffsetX = Infinity;
+ moveOffsetX = Number.POSITIVE_INFINITY;
} else if (rangeType === RANGE_TYPE.COLUMN) {
- moveOffsetY = Infinity;
+ moveOffsetY = Number.POSITIVE_INFINITY;
}
const selectionData = this._getSelectedRangeWithMerge(moveOffsetX, moveOffsetY, scaleX, scaleY, scrollXY);
diff --git a/packages/sheets-ui/src/services/status-bar.service.ts b/packages/sheets-ui/src/services/status-bar.service.ts
index 805de10997..ca88bdb762 100644
--- a/packages/sheets-ui/src/services/status-bar.service.ts
+++ b/packages/sheets-ui/src/services/status-bar.service.ts
@@ -82,6 +82,7 @@ export class StatusBarService implements IStatusBarService, IDisposable {
(status.values.find((item) => item.func === FUNCTION_NAMES_STATISTICAL.COUNT)?.value ?? 0) > 0,
},
];
+
private readonly _state$ = new BehaviorSubject<Nullable<IStatusBarServiceStatus>>(null);
readonly state$ = this._state$.asObservable();
diff --git a/packages/sheets-ui/src/views/header-resize-shape.ts b/packages/sheets-ui/src/views/header-resize-shape.ts
index be42acd33e..2e3f76f076 100644
--- a/packages/sheets-ui/src/views/header-resize-shape.ts
+++ b/packages/sheets-ui/src/views/header-resize-shape.ts
@@ -37,7 +37,7 @@ export const HEADER_MENU_SHAPE_WIDTH_HEIGHT = 12;
export const HEADER_MENU_SHAPE_THUMB_SIZE = 4;
export class HeaderMenuResizeShape<
- T extends IHeaderMenuShapeResizeProps = IHeaderMenuShapeResizeProps,
+ T extends IHeaderMenuShapeResizeProps = IHeaderMenuShapeResizeProps
> extends Shape<T> {
private _size: number = HEADER_MENU_SHAPE_WIDTH_HEIGHT;
diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
index e9309560b7..8139c283c7 100644
--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
@@ -135,34 +135,36 @@ export function SheetBarMenu(props: ISheetBarMenuProps) {
<Dropdown
placement="topLeft"
trigger={['click']}
- overlay={
+ overlay={(
<ul className={styles.sheetBarMenu} style={{ ...style }}>
{menu.map((item) => (
<li
key={item.index}
onClick={() => handleClick(item)}
- className={
- item.selected
- ? `${styles.sheetBarMenuItem} ${styles.sheetBarMenuItemSelect}`
- : item.hidden
- ? `${styles.sheetBarMenuItem} ${styles.sheetBarMenuItemHide}`
- : styles.sheetBarMenuItem
- }
+ className={item.selected
+ ? `${styles.sheetBarMenuItem} ${styles.sheetBarMenuItemSelect}`
+ : item.hidden
+ ? `${styles.sheetBarMenuItem} ${styles.sheetBarMenuItemHide}`
+ : styles.sheetBarMenuItem}
>
<span className={styles.sheetBarMenuItemIcon}>
- {item.selected ? (
- <CheckMarkSingle />
- ) : item.hidden ? (
- <EyelashSingle />
- ) : (
- <CheckMarkSingle />
- )}
+ {item.selected
+ ? (
+ <CheckMarkSingle />
+ )
+ : item.hidden
+ ? (
+ <EyelashSingle />
+ )
+ : (
+ <CheckMarkSingle />
+ )}
</span>
<span className={styles.sheetBarMenuItemLabel}>{item.label}</span>
</li>
))}
</ul>
- }
+ )}
visible={visible}
onVisibleChange={onVisibleChange}
>
diff --git a/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx b/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
index db71dc07cd..208dd44abc 100644
--- a/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
+++ b/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
@@ -70,9 +70,11 @@ export const CopyableStatisticItem: React.FC<IStatisticItem> = (item: IStatistic
return (
<Tooltip title={localeService.t('statusbar.clickToCopy')} placement="top">
<div key={item.name} className={styles.statisticItem} onClick={copyToClipboard}>
- <span>{`${localeService.t(
- functionDisplayNames?.[item.name as string] || (item.name as string)
- )}: ${formateValue}`}</span>
+ <span>
+ {`${localeService.t(
+ functionDisplayNames?.[item.name as string] || (item.name as string)
+ )}: ${formateValue}`}
+ </span>
</div>
</Tooltip>
);
diff --git a/packages/sheets-ui/src/views/status-bar/StatusBar.tsx b/packages/sheets-ui/src/views/status-bar/StatusBar.tsx
index c9b4f50c21..ac9f78f20c 100644
--- a/packages/sheets-ui/src/views/status-bar/StatusBar.tsx
+++ b/packages/sheets-ui/src/views/status-bar/StatusBar.tsx
@@ -99,7 +99,8 @@ export const StatusBar = () => {
{item?.[0] && <CopyableStatisticItem key={item?.[0].name} {...item?.[0]} />}
{item?.[1] && <CopyableStatisticItem key={item?.[1].name} {...item?.[1]} />}
</div>
- ))}{' '}
+ ))}
+ {' '}
</>
);
} else {
diff --git a/packages/sheets-ui/tsconfig.json b/packages/sheets-ui/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-ui/tsconfig.json
+++ b/packages/sheets-ui/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-ui/tsconfig.node.json b/packages/sheets-ui/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-ui/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-ui/vite.config.ts b/packages/sheets-ui/vite.config.ts
index be1b3016e5..a605fcdcad 100644
--- a/packages/sheets-ui/vite.config.ts
+++ b/packages/sheets-ui/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets-zen-editor/package.json b/packages/sheets-zen-editor/package.json
index 869ecfd71f..9224eac846 100644
--- a/packages/sheets-zen-editor/package.json
+++ b/packages/sheets-zen-editor/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/sheets-zen-editor",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "Zen Editor plugin for Univer Sheets.",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,33 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/docs": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/infra": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "clsx": ">=2.0.0",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -63,20 +78,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "clsx": ">=2.0.0",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/sheets-zen-editor/tsconfig.json b/packages/sheets-zen-editor/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets-zen-editor/tsconfig.json
+++ b/packages/sheets-zen-editor/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets-zen-editor/tsconfig.node.json b/packages/sheets-zen-editor/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets-zen-editor/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets-zen-editor/vite.config.ts b/packages/sheets-zen-editor/vite.config.ts
index f1c19ca2dc..38c7db74ca 100644
--- a/packages/sheets-zen-editor/vite.config.ts
+++ b/packages/sheets-zen-editor/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/sheets/package.json b/packages/sheets/package.json
index 8293b81936..37973d08a2 100644
--- a/packages/sheets/package.json
+++ b/packages/sheets/package.json
@@ -1,10 +1,15 @@
{
"name": "@univerjs/sheets",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal base-sheets",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,23 +30,26 @@
}
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-formula": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
@@ -50,20 +58,13 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
+ "@univerjs/infra": "workspace:*",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/sheets/src/commands/commands/add-worksheet-merge.command.ts b/packages/sheets/src/commands/commands/add-worksheet-merge.command.ts
index 031cebf128..b8c108bac5 100644
--- a/packages/sheets/src/commands/commands/add-worksheet-merge.command.ts
+++ b/packages/sheets/src/commands/commands/add-worksheet-merge.command.ts
@@ -70,10 +70,7 @@ function getClearContentMutationParamsForRanges(
unitId: string,
worksheet: Worksheet,
ranges: IRange[]
-): {
- undos: IMutationInfo[];
- redos: IMutationInfo[];
-} {
+): { undos: IMutationInfo[]; redos: IMutationInfo[] } {
const undos: IMutationInfo[] = [];
const redos: IMutationInfo[] = [];
@@ -120,7 +117,7 @@ function getClearContentMutationParamForRange(worksheet: Worksheet, range: IRang
export const AddWorksheetMergeCommand: ICommand = {
type: CommandType.COMMAND,
id: 'sheet.command.add-worksheet-merge',
- // eslint-disable-next-line max-lines-per-function
+
handler: async (accessor: IAccessor, params: IAddMergeCommandParams) => {
const commandService = accessor.get(ICommandService);
const undoRedoService = accessor.get(IUndoRedoService);
diff --git a/packages/sheets/src/commands/commands/move-rows-cols.command.ts b/packages/sheets/src/commands/commands/move-rows-cols.command.ts
index 9103d23674..69e29e8973 100644
--- a/packages/sheets/src/commands/commands/move-rows-cols.command.ts
+++ b/packages/sheets/src/commands/commands/move-rows-cols.command.ts
@@ -122,10 +122,10 @@ export const MoveRowsCommand: ICommand<IMoveRowsCommandParams> = {
const destSelection: IRange = moveBackward
? destinationRange
: {
- ...destinationRange,
- startRow: destinationRange.startRow - count,
- endRow: destinationRange.endRow - count,
- };
+ ...destinationRange,
+ startRow: destinationRange.startRow - count,
+ endRow: destinationRange.endRow - count,
+ };
const setSelectionsParam: ISetSelectionsOperationParams = {
unitId,
subUnitId,
@@ -249,10 +249,10 @@ export const MoveColsCommand: ICommand<IMoveColsCommandParams> = {
const destSelection: IRange = moveBackward
? destinationRange
: {
- ...destinationRange,
- startColumn: destinationRange.startColumn - count,
- endColumn: destinationRange.endColumn - count,
- };
+ ...destinationRange,
+ startColumn: destinationRange.startColumn - count,
+ endColumn: destinationRange.endColumn - count,
+ };
const setSelectionsParam: ISetSelectionsOperationParams = {
unitId,
subUnitId,
diff --git a/packages/sheets/src/commands/commands/remove-row-col.command.ts b/packages/sheets/src/commands/commands/remove-row-col.command.ts
index 8339990853..57940f1ea4 100644
--- a/packages/sheets/src/commands/commands/remove-row-col.command.ts
+++ b/packages/sheets/src/commands/commands/remove-row-col.command.ts
@@ -121,7 +121,7 @@ export const RemoveColCommandId = 'sheet.command.remove-col';
export const RemoveColCommand: ICommand = {
type: CommandType.COMMAND,
id: RemoveColCommandId,
- // eslint-disable-next-line max-lines-per-function
+
handler: async (accessor: IAccessor, params?: IRemoveRowColCommandParams) => {
const selectionManagerService = accessor.get(SelectionManagerService);
const sheetInterceptorService = accessor.get(SheetInterceptorService);
diff --git a/packages/sheets/src/commands/commands/set-col-visible.command.ts b/packages/sheets/src/commands/commands/set-col-visible.command.ts
index 245260c81a..076c1a6206 100644
--- a/packages/sheets/src/commands/commands/set-col-visible.command.ts
+++ b/packages/sheets/src/commands/commands/set-col-visible.command.ts
@@ -133,10 +133,10 @@ export const SetSelectedColsVisibleCommand: ICommand = {
return accessor
.get(ICommandService)
.executeCommand<ISetSpecificColsVisibleCommandParams>(SetSpecificColsVisibleCommand.id, {
- unitId,
- subUnitId,
- ranges: hiddenRanges,
- });
+ unitId,
+ subUnitId,
+ ranges: hiddenRanges,
+ });
},
};
diff --git a/packages/sheets/src/commands/commands/set-row-visible.command.ts b/packages/sheets/src/commands/commands/set-row-visible.command.ts
index a8c4c29ed7..d791d339a7 100644
--- a/packages/sheets/src/commands/commands/set-row-visible.command.ts
+++ b/packages/sheets/src/commands/commands/set-row-visible.command.ts
@@ -137,10 +137,10 @@ export const SetSelectedRowsVisibleCommand: ICommand = {
return accessor
.get(ICommandService)
.executeCommand<ISetSpecificRowsVisibleCommandParams>(SetSpecificRowsVisibleCommand.id, {
- unitId,
- subUnitId,
- ranges: hiddenRanges,
- });
+ unitId,
+ subUnitId,
+ ranges: hiddenRanges,
+ });
},
};
diff --git a/packages/sheets/src/commands/commands/set-worksheet-col-width.command.ts b/packages/sheets/src/commands/commands/set-worksheet-col-width.command.ts
index 01cf26b087..a6fa9ba2b3 100644
--- a/packages/sheets/src/commands/commands/set-worksheet-col-width.command.ts
+++ b/packages/sheets/src/commands/commands/set-worksheet-col-width.command.ts
@@ -67,11 +67,11 @@ export const DeltaColumnWidthCommand: ICommand<IDeltaColumnWidthCommandParams> =
const rangeType = isAllSheetRange
? RANGE_TYPE.ALL
: colSelections.some(({ range }) => {
- const { startColumn, endColumn } = range;
- return startColumn <= anchorCol && anchorCol <= endColumn;
- })
- ? RANGE_TYPE.COLUMN
- : RANGE_TYPE.NORMAL;
+ const { startColumn, endColumn } = range;
+ return startColumn <= anchorCol && anchorCol <= endColumn;
+ })
+ ? RANGE_TYPE.COLUMN
+ : RANGE_TYPE.NORMAL;
let redoMutationParams: ISetWorksheetColWidthMutationParams;
if (rangeType === RANGE_TYPE.ALL) {
diff --git a/packages/sheets/src/commands/commands/set-worksheet-row-height.command.ts b/packages/sheets/src/commands/commands/set-worksheet-row-height.command.ts
index 1fafe62d82..7813106844 100644
--- a/packages/sheets/src/commands/commands/set-worksheet-row-height.command.ts
+++ b/packages/sheets/src/commands/commands/set-worksheet-row-height.command.ts
@@ -69,11 +69,11 @@ export const DeltaRowHeightCommand: ICommand = {
const rangeType = isAllSheetRange
? RANGE_TYPE.ALL
: rowSelections.some(({ range }) => {
- const { startRow, endRow } = range;
- return startRow <= anchorRow && anchorRow <= endRow;
- })
- ? RANGE_TYPE.ROW
- : RANGE_TYPE.NORMAL;
+ const { startRow, endRow } = range;
+ return startRow <= anchorRow && anchorRow <= endRow;
+ })
+ ? RANGE_TYPE.ROW
+ : RANGE_TYPE.NORMAL;
let redoMutationParams: ISetWorksheetRowHeightMutationParams;
if (rangeType === RANGE_TYPE.ALL) {
@@ -286,13 +286,13 @@ export const SetWorksheetRowIsAutoHeightCommand: ICommand = {
const ranges =
anchorRow != null
? [
- {
- startRow: anchorRow,
- endRow: anchorRow,
- startColumn: 0,
- endColumn: workSheet.getMaxColumns() - 1,
- },
- ]
+ {
+ startRow: anchorRow,
+ endRow: anchorRow,
+ startColumn: 0,
+ endColumn: workSheet.getMaxColumns() - 1,
+ },
+ ]
: selectionManagerService.getSelectionRanges();
if (!ranges?.length) {
diff --git a/packages/sheets/src/commands/utils/get-target.ts b/packages/sheets/src/commands/utils/get-target.ts
index bc89cd5965..7ce695e5d8 100644
--- a/packages/sheets/src/commands/utils/get-target.ts
+++ b/packages/sheets/src/commands/utils/get-target.ts
@@ -30,12 +30,7 @@ export function getCommandTarget(
univerInstanceService: IUniverInstanceService,
unitId?: string,
subUnitId?: string
-): {
- workbook: Workbook;
- worksheet: Worksheet;
- unitId: string;
- subUnitId: string;
-} {
+): { workbook: Workbook; worksheet: Worksheet; unitId: string; subUnitId: string } {
const workbook = unitId
? univerInstanceService.getUniverSheetInstance(unitId)
: univerInstanceService.getCurrentUniverSheetInstance();
diff --git a/packages/sheets/src/services/border-style-manager.service.ts b/packages/sheets/src/services/border-style-manager.service.ts
index c18b76eb6b..37475deebb 100644
--- a/packages/sheets/src/services/border-style-manager.service.ts
+++ b/packages/sheets/src/services/border-style-manager.service.ts
@@ -38,7 +38,6 @@ export class BorderStyleManagerService implements IDisposable {
private readonly _borderInfo$ = new BehaviorSubject<IBorderInfo>(this._borderInfo);
- // eslint-disable-next-line @typescript-eslint/member-ordering
readonly borderInfo$ = this._borderInfo$.asObservable();
dispose(): void {
diff --git a/packages/sheets/src/services/numfmt/type.ts b/packages/sheets/src/services/numfmt/type.ts
index 2f7ca8879e..67d5d57f9a 100644
--- a/packages/sheets/src/services/numfmt/type.ts
+++ b/packages/sheets/src/services/numfmt/type.ts
@@ -19,7 +19,7 @@ import { LifecycleStages, runOnLifecycle } from '@univerjs/core';
import { createIdentifier } from '@wendellhu/redi';
import type { Observable } from 'rxjs';
-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
+// eslint-disable-next-line ts/consistent-type-definitions
export type INumfmtItem = {
i: string;
};
diff --git a/packages/sheets/src/services/sheet-interceptor/__tests__/sheet-interceptor.service.spec.ts b/packages/sheets/src/services/sheet-interceptor/__tests__/sheet-interceptor.service.spec.ts
index f07e2b019f..b957e39175 100644
--- a/packages/sheets/src/services/sheet-interceptor/__tests__/sheet-interceptor.service.spec.ts
+++ b/packages/sheets/src/services/sheet-interceptor/__tests__/sheet-interceptor.service.spec.ts
@@ -130,7 +130,6 @@ describe('Test SheetInterceptorService', () => {
it('the second interceptor should not be executed when not call next in the first interceptor', () => {
get(SheetInterceptorService).intercept(stringIntercept, {
priority: 100,
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
handler(value, _, _next) {
return `${value} first`;
},
diff --git a/packages/sheets/tsconfig.json b/packages/sheets/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/sheets/tsconfig.json
+++ b/packages/sheets/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/sheets/tsconfig.node.json b/packages/sheets/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/sheets/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/sheets/vite.config.ts b/packages/sheets/vite.config.ts
index aca522727b..9995441f5f 100644
--- a/packages/sheets/vite.config.ts
+++ b/packages/sheets/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import { name } from './package.json';
diff --git a/packages/slides-ui/package.json b/packages/slides-ui/package.json
index c03c277f56..080800e6e2 100644
--- a/packages/slides-ui/package.json
+++ b/packages/slides-ui/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/slides-ui",
"version": "0.1.0-beta.2",
+ "private": true,
"description": "Univer normal ui-plugin-slides",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,25 +34,27 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": true,
"scripts": {},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/slides": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
"@univerjs/engine-render": "workspace:*",
+ "@univerjs/infra": "workspace:*",
"@univerjs/slides": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "^0.12.13",
@@ -58,16 +68,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/slides": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0"
}
}
diff --git a/packages/slides-ui/tsconfig.json b/packages/slides-ui/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/slides-ui/tsconfig.json
+++ b/packages/slides-ui/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/slides-ui/tsconfig.node.json b/packages/slides-ui/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/slides-ui/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/slides-ui/vite.config.ts b/packages/slides-ui/vite.config.ts
index de267ca8dc..50cac5ab89 100644
--- a/packages/slides-ui/vite.config.ts
+++ b/packages/slides-ui/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/slides/package.json b/packages/slides/package.json
index c308c8a2ef..edc844eed1 100644
--- a/packages/slides/package.json
+++ b/packages/slides/package.json
@@ -1,9 +1,14 @@
{
"name": "@univerjs/slides",
-
"version": "0.1.0-beta.2",
+ "private": true,
+ "description": "",
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -25,18 +30,19 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "private": true,
"scripts": {},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/engine-render": "workspace:*",
@@ -45,19 +51,13 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12"
}
}
diff --git a/packages/slides/src/views/render/adaptors/slide-adaptor.ts b/packages/slides/src/views/render/adaptors/slide-adaptor.ts
index ea875b542f..404be98eda 100644
--- a/packages/slides/src/views/render/adaptors/slide-adaptor.ts
+++ b/packages/slides/src/views/render/adaptors/slide-adaptor.ts
@@ -22,6 +22,7 @@ import { Inject, Injector } from '@wendellhu/redi';
import { CanvasObjectProviderRegistry, ObjectAdaptor } from '../adaptor';
import { ObjectProvider } from '../object-provider';
+
// import { DocsAdaptor, ImageAdaptor, RichTextAdaptor, ShapeAdaptor } from './';
export enum SLIDE_VIEW_KEY {
diff --git a/packages/slides/tsconfig.json b/packages/slides/tsconfig.json
index ccde33f16e..32af46af22 100644
--- a/packages/slides/tsconfig.json
+++ b/packages/slides/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/slides/tsconfig.node.json b/packages/slides/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/slides/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/slides/vite.config.ts b/packages/slides/vite.config.ts
index 951a023f3d..789fe71725 100644
--- a/packages/slides/vite.config.ts
+++ b/packages/slides/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 23cb4c305d..7171a3de04 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/ui",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UniverSheet normal plugin UI manager",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,28 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/engine-render": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "react": ">=16.9.0",
+ "react-dom": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -65,6 +75,7 @@
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@types/react-transition-group": "^4.4.10",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"happy-dom": "^12.10.3",
@@ -72,16 +83,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "react": ">=16.9.0",
- "react-dom": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/ui/src/common/lifecycle.ts b/packages/ui/src/common/lifecycle.ts
index c9a5c02c20..95c60ecc3e 100644
--- a/packages/ui/src/common/lifecycle.ts
+++ b/packages/ui/src/common/lifecycle.ts
@@ -19,7 +19,6 @@ import type { IDisposable } from '@wendellhu/redi';
export function fromDocumentEvent<K extends keyof DocumentEventMap>(
type: K,
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
listener: (this: Document, ev: DocumentEventMap[K]) => any,
options?: boolean | AddEventListenerOptions
): IDisposable {
@@ -30,7 +29,6 @@ export function fromDocumentEvent<K extends keyof DocumentEventMap>(
export function fromEvent<K extends keyof HTMLElementEventMap>(
target: HTMLElement,
type: K,
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions
): IDisposable {
diff --git a/packages/ui/src/services/menu/menu.ts b/packages/ui/src/services/menu/menu.ts
index cb25683086..7375d4b6ed 100644
--- a/packages/ui/src/services/menu/menu.ts
+++ b/packages/ui/src/services/menu/menu.ts
@@ -75,14 +75,14 @@ interface IMenuItemBase<V> {
type: MenuItemType;
/**
* Custom label component id.
- * */
+ */
label?:
| string
| {
- name: string;
- hoverable?: boolean;
- props?: Record<string, any>;
- }; // custom component, send to CustomLabel label property
+ name: string;
+ hoverable?: boolean;
+ props?: Record<string, any>;
+ }; // custom component, send to CustomLabel label property
hidden$?: Observable<boolean>;
disabled$?: Observable<boolean>;
@@ -102,10 +102,10 @@ export interface IValueOption<T = undefined> {
label?:
| string
| {
- name: string;
- hoverable?: boolean;
- props?: Record<string, string | number | Array<{ [x: string | number]: string }>>;
- }; // custom component, send to CustomLabel label property
+ name: string;
+ hoverable?: boolean;
+ props?: Record<string, string | number | Array<{ [x: string | number]: string }>>;
+ }; // custom component, send to CustomLabel label property
icon?: string;
tooltip?: string;
style?: object;
diff --git a/packages/ui/src/views/components/dialog-part/DialogPart.tsx b/packages/ui/src/views/components/dialog-part/DialogPart.tsx
index ac80e9e267..d22a8a63e2 100644
--- a/packages/ui/src/views/components/dialog-part/DialogPart.tsx
+++ b/packages/ui/src/views/components/dialog-part/DialogPart.tsx
@@ -39,7 +39,7 @@ export function DialogPart() {
};
}, []);
- const props = dialogOptions.map((options) => {
+ const attrs = dialogOptions.map((options) => {
const { children, title, closeIcon, footer, ...restProps } = options;
const dialogProps = restProps as IDialogProps & { id: string };
@@ -55,5 +55,5 @@ export function DialogPart() {
return dialogProps;
});
- return <>{props?.map((options) => <Dialog key={options.id} {...options} />)}</>;
+ return <>{attrs?.map((options) => <Dialog key={options.id} {...options} />)}</>;
}
diff --git a/packages/ui/src/views/components/doc-bars/Toolbar.tsx b/packages/ui/src/views/components/doc-bars/Toolbar.tsx
index b0bbc435ed..9dcff073a0 100644
--- a/packages/ui/src/views/components/doc-bars/Toolbar.tsx
+++ b/packages/ui/src/views/components/doc-bars/Toolbar.tsx
@@ -153,17 +153,17 @@ export function Toolbar(props: IToolbarProps) {
<header className={styles.headerbar}>
<div className={styles.menubar}>
{group.length > 1 &&
- group.map((item, index) => (
- <a
- key={index}
- className={clsx(styles.menubarItem, {
- [styles.menubarItemActive]: item.name === position,
- })}
- onClick={() => setPosition(item.name)}
- >
- {localeService.t(item.name)}
- </a>
- ))}
+ group.map((item, index) => (
+ <a
+ key={index}
+ className={clsx(styles.menubarItem, {
+ [styles.menubarItemActive]: item.name === position,
+ })}
+ onClick={() => setPosition(item.name)}
+ >
+ {localeService.t(item.name)}
+ </a>
+ ))}
</div>
<div className={styles.headerMenu}>
<ComponentContainer components={headerMenuComponents} />
@@ -185,7 +185,7 @@ export function Toolbar(props: IToolbarProps) {
<Tooltip title="更多" placement="bottom">
<Dropdown
className={styles.toolbarMore}
- overlay={
+ overlay={(
<div className={styles.toolbarMoreContainer} onClick={(e) => e.stopPropagation()}>
{Object.entries(toolbarGroups).map(([key, item]) => (
<div key={key} className={styles.toolbarGroup}>
@@ -198,7 +198,7 @@ export function Toolbar(props: IToolbarProps) {
</div>
))}
</div>
- }
+ )}
>
<ToolbarButton className={styles.toolbarItemTextButton}>
<MoreFunctionSingle />
diff --git a/packages/ui/src/views/components/doc-bars/ToolbarItem.tsx b/packages/ui/src/views/components/doc-bars/ToolbarItem.tsx
index aea5289e9c..c8e840388f 100644
--- a/packages/ui/src/views/components/doc-bars/ToolbarItem.tsx
+++ b/packages/ui/src/views/components/doc-bars/ToolbarItem.tsx
@@ -37,7 +37,6 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref:
const localeService = useDependency(LocaleService);
const commandService = useDependency(ICommandService);
const injector = useInjector();
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
const [value, setValue] = useState<any>();
const [disabled, setDisabled] = useState(false);
const [activated, setActivated] = useState(false);
@@ -68,34 +67,34 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref:
const subscriptions: Subscription[] = [];
props.disabled$ &&
- subscriptions.push(
- props.disabled$.subscribe((disabled) => {
- setDisabled(disabled);
- })
- );
+ subscriptions.push(
+ props.disabled$.subscribe((disabled) => {
+ setDisabled(disabled);
+ })
+ );
props.hidden$ &&
- subscriptions.push(
- props.hidden$.subscribe((hidden) => {
- setHidden(hidden);
- })
- );
+ subscriptions.push(
+ props.hidden$.subscribe((hidden) => {
+ setHidden(hidden);
+ })
+ );
if (props.type === MenuItemType.BUTTON) {
props.activated$ &&
- subscriptions.push(
- props.activated$.subscribe((activated) => {
- setActivated(activated);
- })
- );
- }
-
- props.value$ &&
subscriptions.push(
- props.value$.subscribe((value) => {
- setValue(value);
+ props.activated$.subscribe((activated) => {
+ setActivated(activated);
})
);
+ }
+
+ props.value$ &&
+ subscriptions.push(
+ props.value$.subscribe((value) => {
+ setValue(value);
+ })
+ );
return () => {
subscriptions.forEach((subscription) => {
@@ -153,63 +152,65 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref:
}
}
- return menuType === MenuItemType.BUTTON_SELECTOR ? (
- <div
- className={`${styles.toolbarItemSelectButton} ${
- disabled ? styles.toolbarItemSelectButtonDisabled : ''
- }`}
- data-disabled={disabled}
- >
- <div className={styles.toolbarItemSelectButtonLabel} onClick={handleClick}>
- <CustomLabel
- icon={iconToDisplay}
- title={title!}
- value={value}
- label={label}
- onChange={handleChange}
- />
+ return menuType === MenuItemType.BUTTON_SELECTOR
+ ? (
+ <div
+ className={`${styles.toolbarItemSelectButton} ${
+ disabled ? styles.toolbarItemSelectButtonDisabled : ''
+ }`}
+ data-disabled={disabled}
+ >
+ <div className={styles.toolbarItemSelectButtonLabel} onClick={handleClick}>
+ <CustomLabel
+ icon={iconToDisplay}
+ title={title!}
+ value={value}
+ label={label}
+ onChange={handleChange}
+ />
+ </div>
+ {!disabled && (
+ <Dropdown
+ overlay={<Menu menuType={id} options={options} onOptionSelect={handleSelect} value={value} />}
+ onVisibleChange={handleDropdownVisibleChange}
+ >
+ <div
+ className={`${styles.toolbarItemSelectButtonArrow} ${
+ disabled ? styles.toolbarItemSelectButtonArrowDisabled : ''
+ }`}
+ data-disabled={disabled}
+ >
+ <MoreDownSingle />
+ </div>
+ </Dropdown>
+ )}
</div>
- {!disabled && (
+ )
+ : !disabled
+ ? (
<Dropdown
overlay={<Menu menuType={id} options={options} onOptionSelect={handleSelect} value={value} />}
onVisibleChange={handleDropdownVisibleChange}
>
- <div
- className={`${styles.toolbarItemSelectButtonArrow} ${
- disabled ? styles.toolbarItemSelectButtonArrowDisabled : ''
- }`}
- data-disabled={disabled}
- >
- <MoreDownSingle />
+ <div className={`${styles.toolbarItemSelect} ${disabled ? styles.toolbarItemSelectDisabled : ''}`}>
+ <CustomLabel
+ icon={iconToDisplay}
+ title={title!}
+ value={value}
+ label={label}
+ onChange={handleChange}
+ />
+ <div
+ className={`${styles.toolbarItemSelectArrow} ${
+ disabled ? styles.toolbarItemSelectArrowDisabled : ''
+ }`}
+ >
+ <MoreDownSingle />
+ </div>
</div>
</Dropdown>
- )}
- </div>
- ) : !disabled ? (
- <Dropdown
- overlay={<Menu menuType={id} options={options} onOptionSelect={handleSelect} value={value} />}
- onVisibleChange={handleDropdownVisibleChange}
- >
- <div className={`${styles.toolbarItemSelect} ${disabled ? styles.toolbarItemSelectDisabled : ''}`}>
- <CustomLabel
- icon={iconToDisplay}
- title={title!}
- value={value}
- label={label}
- onChange={handleChange}
- />
- <div
- className={`${styles.toolbarItemSelectArrow} ${
- disabled ? styles.toolbarItemSelectArrowDisabled : ''
- }`}
- >
- <MoreDownSingle />
- </div>
- </div>
- </Dropdown>
- ) : (
- <></>
- );
+ )
+ : <></>;
}
function renderButtonType() {
@@ -224,11 +225,13 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref:
onClick={() => handleCommandExecuted(props.id)}
onDoubleClick={() => props.subId && handleCommandExecuted(props.subId)}
>
- {isCustomComponent ? (
- <CustomLabel title={title!} value={value} label={label} />
- ) : (
- <CustomLabel icon={icon} />
- )}
+ {isCustomComponent
+ ? (
+ <CustomLabel title={title!} value={value} label={label} />
+ )
+ : (
+ <CustomLabel icon={icon} />
+ )}
</ToolbarButton>
);
}
@@ -246,17 +249,19 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref:
}
// ref component
- return hidden ? (
- <></>
- ) : (
- <Tooltip
- ref={ref}
- visible={dropdownVisible ? false : tooltipVisible}
- title={tooltipTitle}
- placement="bottom"
- onVisibleChange={handleVisibleChange}
- >
- {renderItem()}
- </Tooltip>
- );
+ return hidden
+ ? (
+ <></>
+ )
+ : (
+ <Tooltip
+ ref={ref}
+ visible={dropdownVisible ? false : tooltipVisible}
+ title={tooltipTitle}
+ placement="bottom"
+ onVisibleChange={handleVisibleChange}
+ >
+ {renderItem()}
+ </Tooltip>
+ );
});
diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json
index fce974769c..32af46af22 100644
--- a/packages/ui/tsconfig.json
+++ b/packages/ui/tsconfig.json
@@ -1,10 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false,
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/ui/tsconfig.node.json b/packages/ui/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/ui/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts
index 19a73e5a9f..d4472587ec 100644
--- a/packages/ui/vite.config.ts
+++ b/packages/ui/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
diff --git a/packages/uniscript/package.json b/packages/uniscript/package.json
index 63ab8534f5..290651560d 100644
--- a/packages/uniscript/package.json
+++ b/packages/uniscript/package.json
@@ -1,10 +1,18 @@
{
"name": "@univerjs/uniscript",
"version": "0.1.0-beta.2",
+ "private": false,
"description": "UI component library for building exceptional Univer.",
- "keywords": [],
"author": "DreamNum <[email protected]>",
"license": "Apache-2.0",
+ "keywords": [],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "exports": {
+ ".": "./src/index.ts",
+ "./*": "./src/*"
+ },
"main": "./lib/cjs/index.js",
"module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
@@ -26,26 +34,31 @@
"./lib/*": "./lib/*"
}
},
- "exports": {
- ".": "./src/index.ts",
- "./*": "./src/*"
- },
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
- "sideEffects": [
- "**/*.css"
- ],
- "private": false,
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
+ "lint:types": "tsc --noEmit",
"build": "tsc && vite build"
},
+ "peerDependencies": {
+ "@univerjs/core": "workspace:*",
+ "@univerjs/design": "workspace:*",
+ "@univerjs/facade": "workspace:*",
+ "@univerjs/sheets": "workspace:*",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@univerjs/ui": "workspace:*",
+ "@wendellhu/redi": ">=0.12.12",
+ "monaco-editor": ">=0.44.0",
+ "react": ">=16.9.0",
+ "rxjs": ">=7.0.0"
+ },
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
@@ -59,25 +72,13 @@
},
"devDependencies": {
"@types/react": "^18.2.47",
+ "@univerjs/infra": "workspace:*",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.1.1",
"less": "^4.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
- "vite-plugin-externals": "^0.6.2",
"vitest": "^1.1.1"
- },
- "peerDependencies": {
- "@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/facade": "workspace:*",
- "@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": ">=0.12.12",
- "monaco-editor": ">=0.44.0",
- "react": ">=16.9.0",
- "rxjs": ">=7.0.0"
}
}
diff --git a/packages/uniscript/src/services/script-execution.service.ts b/packages/uniscript/src/services/script-execution.service.ts
index e42a91a0bf..768adfb845 100644
--- a/packages/uniscript/src/services/script-execution.service.ts
+++ b/packages/uniscript/src/services/script-execution.service.ts
@@ -33,7 +33,7 @@ export class UniscriptExecutionService extends Disposable {
this._logService.log('[UniscriptExecutionService]', 'executing Uniscript...');
const apiInstance = FUniver.newAPI(this._injector);
- // eslint-disable-next-line @typescript-eslint/no-implied-eval
+ // eslint-disable-next-line no-new-func
const scriptFunction = new Function('univerAPI', `(() => {${code}})()`);
try {
diff --git a/packages/uniscript/tsconfig.json b/packages/uniscript/tsconfig.json
index a98255ae7d..32af46af22 100644
--- a/packages/uniscript/tsconfig.json
+++ b/packages/uniscript/tsconfig.json
@@ -1,11 +1,9 @@
{
- "extends": "../../tsconfig.json",
+ "extends": "@univerjs/infra/tsconfigs/base",
"compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "esModuleInterop": true,
- "strictPropertyInitialization": false
+ "rootDir": "src",
+ "outDir": "lib/types"
},
- "include": ["src/**/*"],
- "exclude": ["./examples/china-id-validation.js"]
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "include": ["src"]
}
diff --git a/packages/uniscript/tsconfig.node.json b/packages/uniscript/tsconfig.node.json
new file mode 100644
index 0000000000..90b3125e38
--- /dev/null
+++ b/packages/uniscript/tsconfig.node.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@univerjs/infra/tsconfigs/node",
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/uniscript/vite.config.ts b/packages/uniscript/vite.config.ts
index ec40a4d4ab..ffe69d5507 100644
--- a/packages/uniscript/vite.config.ts
+++ b/packages/uniscript/vite.config.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'path';
+import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
@@ -22,7 +22,8 @@ export default defineConfig(({ mode }) => ({
alias: [
{
find: /^monaco-editor$/,
- replacement: __dirname + '/node_modules/monaco-editor/esm/vs/editor/editor.api',
+ // eslint-disable-next-line node/no-path-concat
+ replacement: `${__dirname}/node_modules/monaco-editor/esm/vs/editor/editor.api`,
},
],
},
diff --git a/playwright.config.ts b/playwright.config.ts
index 16b541a767..5885fae82e 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -1,3 +1,4 @@
+/* eslint-disable node/prefer-global/process */
import { defineConfig, devices } from '@playwright/test';
/**
@@ -10,52 +11,52 @@ import { defineConfig, devices } from '@playwright/test';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
- testDir: './e2e',
- /* Run tests in files in parallel */
- fullyParallel: true,
- /* Fail the build on CI if you accidentally left test.only in the source code. */
- forbidOnly: !!process.env.CI,
- /* Retry on CI only */
- retries: process.env.CI ? 2 : 0,
- /* Opt out of parallel tests on CI. */
- workers: process.env.CI ? 1 : undefined,
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
- reporter: 'html',
- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
- use: {
+ testDir: './e2e',
+ /* Run tests in files in parallel */
+ fullyParallel: true,
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
+ forbidOnly: !!process.env.CI,
+ /* Retry on CI only */
+ retries: process.env.CI ? 2 : 0,
+ /* Opt out of parallel tests on CI. */
+ workers: process.env.CI ? 1 : undefined,
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
+ reporter: 'html',
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
+ use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
- trace: 'on-first-retry',
- },
-
- /* Configure projects for major browsers */
- projects: [
- {
- name: 'chromium',
- use: { ...devices['Desktop Chrome'] },
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
+ trace: 'on-first-retry',
},
- // {
- // name: 'firefox',
- // use: { ...devices['Desktop Firefox'] },
- // },
+ /* Configure projects for major browsers */
+ projects: [
+ {
+ name: 'chromium',
+ use: { ...devices['Desktop Chrome'] },
+ },
- // {
- // name: 'webkit',
- // use: { ...devices['Desktop Safari'] },
- // },
+ // {
+ // name: 'firefox',
+ // use: { ...devices['Desktop Firefox'] },
+ // },
- /* Test against mobile viewports. */
- // {
- // name: 'Mobile Chrome',
- // use: { ...devices['Pixel 5'] },
- // },
- // {
- // name: 'Mobile Safari',
- // use: { ...devices['iPhone 12'] },
- // },
+ // {
+ // name: 'webkit',
+ // use: { ...devices['Desktop Safari'] },
+ // },
+
+ /* Test against mobile viewports. */
+ // {
+ // name: 'Mobile Chrome',
+ // use: { ...devices['Pixel 5'] },
+ // },
+ // {
+ // name: 'Mobile Safari',
+ // use: { ...devices['iPhone 12'] },
+ // },
/* Test against branded browsers. */
// {
@@ -66,12 +67,12 @@ export default defineConfig({
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
- ],
+ ],
- /* Run your local dev server before starting the tests */
- // webServer: {
- // command: 'npm run start',
- // url: 'http://127.0.0.1:3000',
- // reuseExistingServer: !process.env.CI,
- // },
+ /* Run your local dev server before starting the tests */
+ // webServer: {
+ // command: 'npm run start',
+ // url: 'http://127.0.0.1:3000',
+ // reuseExistingServer: !process.env.CI,
+ // },
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dc50eb1fbf..7f49a72f3a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,9 @@ importers:
.:
devDependencies:
+ '@antfu/eslint-config':
+ specifier: ^2.6.3
'@commitlint/cli':
specifier: ^18.4.3
version: 18.4.3([email protected])
@@ -47,12 +50,9 @@ importers:
'@types/react':
specifier: ^18.2.46
version: 18.2.46
- '@typescript-eslint/eslint-plugin':
- specifier: ^6.17.0
- version: 6.17.0(@typescript-eslint/[email protected])([email protected])([email protected])
'@typescript-eslint/parser':
- specifier: ^6.17.0
+ specifier: ^6.19.1
'@univerjs/design':
specifier: workspace:*
version: link:packages/design
@@ -62,36 +62,18 @@ importers:
eslint:
specifier: ^8.56.0
version: 8.56.0
- eslint-config-airbnb-base:
- specifier: ^15.0.0
- eslint-config-airbnb-typescript:
- specifier: ^17.1.0
- version: 17.1.0(@typescript-eslint/[email protected])(@typescript-eslint/[email protected])([email protected])([email protected])
- eslint-config-prettier:
- specifier: ^9.1.0
- version: 9.1.0([email protected])
- eslint-import-resolver-typescript:
- specifier: ^3.6.1
- version: 3.6.1(@typescript-eslint/[email protected])([email protected])([email protected])
eslint-plugin-header:
- specifier: ~3.1.1
+ specifier: ^3.1.1
version: 3.1.1([email protected])
- eslint-plugin-import-newlines:
- specifier: ^1.3.4
- version: 1.3.4([email protected])
- eslint-plugin-prettier:
- specifier: ^5.1.2
eslint-plugin-react:
specifier: ^7.33.2
version: 7.33.2([email protected])
- eslint-plugin-simple-import-sort:
- specifier: ^10.0.0
- version: 10.0.0([email protected])
- eslint-plugin-unused-imports:
- specifier: ^3.0.0
- version: 3.0.0(@typescript-eslint/[email protected])([email protected])
+ eslint-plugin-react-hooks:
+ specifier: ^4.6.0
+ version: 4.6.0([email protected])
+ eslint-plugin-react-refresh:
+ specifier: ^0.4.5
+ version: 0.4.5([email protected])
husky:
specifier: ^8.0.3
version: 8.0.3
@@ -124,7 +106,7 @@ importers:
version: 34.0.0([email protected])
stylelint-config-standard-less:
specifier: ^2.0.0
turbo:
specifier: ^1.11.2
version: 1.11.2
@@ -132,6 +114,8 @@ importers:
specifier: ^5.3.3
version: 5.3.3
+ common/infra: {}
+
examples:
dependencies:
'@univerjs/core':
@@ -219,6 +203,9 @@ importers:
'@types/react-dom':
specifier: ^18.2.18
version: 18.2.18
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../common/infra
esbuild:
specifier: ^0.19.10
version: 0.19.10
@@ -262,6 +249,9 @@ importers:
'@types/numeral':
specifier: ^2.0.5
version: 2.0.5
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -347,6 +337,9 @@ importers:
'@types/react-transition-group':
specifier: ^4.4.10
version: 4.4.10
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -368,9 +361,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -396,6 +386,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -414,9 +407,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -451,6 +441,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -472,9 +465,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -497,6 +487,9 @@ importers:
'@types/big.js':
specifier: ^6.2.2
version: 6.2.2
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -512,9 +505,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -528,6 +518,9 @@ importers:
specifier: ^2.5.2
version: 2.5.2
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -540,9 +533,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
version: 1.1.1(@types/[email protected])([email protected])
@@ -565,6 +555,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -580,9 +573,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -614,6 +604,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -629,9 +622,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
version: 1.1.1(@types/[email protected])([email protected])
@@ -663,6 +653,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -675,9 +668,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
version: 1.1.1(@types/[email protected])([email protected])
@@ -703,6 +693,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -721,9 +714,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -740,6 +730,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
typescript:
specifier: ^5.3.3
version: 5.3.3
@@ -749,9 +742,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
version: 1.1.1(@types/[email protected])([email protected])
@@ -768,6 +758,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -780,9 +773,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
version: 1.1.1(@types/[email protected])([email protected])
@@ -805,6 +795,9 @@ importers:
specifier: ^7.8.1
version: 7.8.1
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -823,9 +816,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -863,6 +853,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -881,9 +874,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -930,6 +920,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -951,9 +944,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -982,6 +972,9 @@ importers:
specifier: ^18.2.0
version: 18.2.0
devDependencies:
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitest/coverage-istanbul':
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -997,9 +990,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1043,6 +1033,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -1061,9 +1054,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1091,6 +1081,9 @@ importers:
'@univerjs/icons':
specifier: ^0.1.26
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@univerjs/sheets':
specifier: workspace:*
version: link:../sheets
@@ -1134,9 +1127,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1158,6 +1148,9 @@ importers:
'@univerjs/icons':
specifier: ^0.1.26
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@univerjs/sheets':
specifier: workspace:*
version: link:../sheets
@@ -1198,9 +1191,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1223,6 +1213,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -1241,9 +1234,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1259,6 +1249,9 @@ importers:
'@univerjs/engine-render':
specifier: workspace:*
version: link:../engine-render
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@univerjs/slides':
specifier: workspace:*
version: link:../slides
@@ -1293,9 +1286,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1351,6 +1341,9 @@ importers:
'@types/react-transition-group':
specifier: ^4.4.10
version: 4.4.10
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -1372,9 +1365,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1415,6 +1405,9 @@ importers:
'@types/react':
specifier: ^18.2.47
version: 18.2.47
+ '@univerjs/infra':
+ specifier: workspace:*
+ version: link:../../common/infra
'@vitejs/plugin-react':
specifier: ^4.2.1
version: 4.2.1([email protected])
@@ -1433,9 +1426,6 @@ importers:
vite-plugin-dts:
specifier: ^3.7.0
- vite-plugin-externals:
- specifier: ^0.6.2
- version: 0.6.2([email protected])
vitest:
specifier: ^1.1.1
@@ -1455,6 +1445,96 @@ packages:
'@jridgewell/trace-mapping': 0.3.20
dev: true
+ resolution: {integrity: sha512-sfkamrOatMwMZkp14mBerHKIw8FY0SD1iCb5UZ6Y5hgb+FeDpNQPlVA0i2PN95TQ8NSYyPC1QnoM+UA5NSl0Kg==}
+ hasBin: true
+ peerDependencies:
+ '@unocss/eslint-plugin': '>=0.50.0'
+ eslint: '>=8.40.0'
+ eslint-plugin-format: '>=0.1.0'
+ eslint-plugin-react: ^7.33.2
+ eslint-plugin-react-hooks: ^4.6.0
+ eslint-plugin-react-refresh: ^0.4.4
+ eslint-plugin-svelte: ^2.34.1
+ svelte-eslint-parser: ^0.33.1
+ peerDependenciesMeta:
+ '@unocss/eslint-plugin':
+ optional: true
+ eslint-plugin-format:
+ optional: true
+ eslint-plugin-react:
+ optional: true
+ eslint-plugin-react-hooks:
+ optional: true
+ eslint-plugin-react-refresh:
+ optional: true
+ eslint-plugin-svelte:
+ optional: true
+ svelte-eslint-parser:
+ optional: true
+ dependencies:
+ '@antfu/eslint-define-config': 1.23.0-2
+ '@antfu/install-pkg': 0.3.1
+ '@eslint-types/jsdoc': 46.8.2-1
+ '@eslint-types/typescript-eslint': 6.18.1
+ '@eslint-types/unicorn': 50.0.1
+ '@stylistic/eslint-plugin': 1.5.4([email protected])([email protected])
+ '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ '@typescript-eslint/parser': 6.19.1([email protected])([email protected])
+ eslint: 8.56.0
+ eslint-config-flat-gitignore: 0.1.2
+ eslint-merge-processors: 0.1.0([email protected])
+ eslint-plugin-antfu: 2.1.2([email protected])
+ eslint-plugin-eslint-comments: 3.2.0([email protected])
+ eslint-plugin-i: 2.29.1(@typescript-eslint/[email protected])([email protected])
+ eslint-plugin-jsdoc: 48.0.2([email protected])
+ eslint-plugin-jsonc: 2.12.2([email protected])
+ eslint-plugin-markdown: 3.0.1([email protected])
+ eslint-plugin-n: 16.6.2([email protected])
+ eslint-plugin-no-only-tests: 3.1.0
+ eslint-plugin-perfectionist: 2.5.0([email protected])([email protected])([email protected])
+ eslint-plugin-react: 7.33.2([email protected])
+ eslint-plugin-react-hooks: 4.6.0([email protected])
+ eslint-plugin-react-refresh: 0.4.5([email protected])
+ eslint-plugin-toml: 0.9.2([email protected])
+ eslint-plugin-unicorn: 50.0.1([email protected])
+ eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/[email protected])([email protected])
+ eslint-plugin-vitest: 0.3.20(@typescript-eslint/[email protected])([email protected])([email protected])
+ eslint-plugin-vue: 9.20.1([email protected])
+ eslint-plugin-yml: 1.12.2([email protected])
+ eslint-processor-vue-blocks: 0.1.1(@vue/[email protected])([email protected])
+ globals: 13.24.0
+ jsonc-eslint-parser: 2.4.0
+ local-pkg: 0.5.0
+ parse-gitignore: 2.0.0
+ picocolors: 1.0.0
+ prompts: 2.4.2
+ toml-eslint-parser: 0.9.3
+ vue-eslint-parser: 9.4.1([email protected])
+ yaml-eslint-parser: 1.2.2
+ yargs: 17.7.2
+ transitivePeerDependencies:
+ - '@vue/compiler-sfc'
+ - astro-eslint-parser
+ - eslint-import-resolver-typescript
+ - eslint-import-resolver-webpack
+ - supports-color
+ - svelte
+ - typescript
+ - vitest
+ dev: true
+
+ resolution: {integrity: sha512-LvxY21+ZhpuBf/aHeBUtGQhSEfad4PkNKXKvDOSvukaM3XVTfBhwmHX2EKwAsdq5DlfjbT3qqYyMiueBIO5iDQ==}
+ engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'}
+ dev: true
+
+ resolution: {integrity: sha512-A3zWY9VeTPnxlMiZtsGHw2lSd3ghwvL8s9RiGOtqvDxhhFfZ781ynsGBa/iUnDJ5zBrmTFQrJDud3TGgRISaxw==}
+ dependencies:
+ execa: 8.0.1
+ dev: true
+
/@aw-web-design/[email protected]:
resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==}
hasBin: true
@@ -1751,6 +1831,14 @@ packages:
'@babel/types': 7.23.5
dev: true
+ resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+ dependencies:
+ '@babel/types': 7.23.5
+ dev: true
+
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.23.3(@babel/[email protected]):
resolution: {integrity: sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==}
engines: {node: '>=6.9.0'}
@@ -2992,6 +3080,15 @@ packages:
react: 18.2.0
dev: true
+ /@es-joy/[email protected]:
+ resolution: {integrity: sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==}
+ engines: {node: '>=16'}
+ dependencies:
+ comment-parser: 1.4.1
+ esquery: 1.5.0
+ jsdoc-type-pratt-parser: 4.0.0
+ dev: true
+
/@esbuild/[email protected]:
resolution: {integrity: sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==}
engines: {node: '>=12'}
@@ -3412,6 +3509,18 @@ packages:
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
dev: true
+ /@eslint-types/[email protected]:
+ resolution: {integrity: sha512-FwD7V0xX0jyaqj8Ul5ZY+TAAPohDfVqtbuXJNHb+OIv1aTIqZi5+Zn3F2UwQ5O3BnQd2mTduyK0+HjGx3/AMFg==}
+ dev: true
+
+ /@eslint-types/[email protected]:
+ resolution: {integrity: sha512-sROyc1rWhtvSdszkR3VAv2fioXIyKNFFRbIgoiije2FA+iNn4FEDhP2+kvbq8wPda2adcrNhSZyWSEFsef+lbg==}
+ dev: true
+
+ /@eslint-types/[email protected]:
+ resolution: {integrity: sha512-nuJuipTNcg9f+oxZ+3QZw4tuDLmir4RJOPfM/oujgToiy1s+tePDZhwg5jUGc3q8OzTtPbVpsFSYX7QApjO3EA==}
+ dev: true
+
resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -3707,11 +3816,6 @@ packages:
dev: true
optional: true
- resolution: {integrity: sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==}
- engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
- dev: true
-
/@playwright/[email protected]:
resolution: {integrity: sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==}
engines: {node: '>=16'}
@@ -5184,6 +5288,72 @@ packages:
file-system-cache: 2.3.0
dev: true
+ resolution: {integrity: sha512-3ctWb3NvJNV1MsrZN91cYp2EGInLPSoZKphXIbIRx/zjZxKwLDr9z4LMOWtqjq14li/OgqUUcMq5pj8fgbLoTw==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: '>=8.40.0'
+ dependencies:
+ acorn: 8.11.3
+ escape-string-regexp: 4.0.0
+ eslint: 8.56.0
+ eslint-visitor-keys: 3.4.3
+ espree: 9.6.1
+ dev: true
+
+ resolution: {integrity: sha512-JUfrpCkeBCqt1IZ4QsP4WgxGza4PhK4LPbc0VnCjHKygl+rgqoDAovqOuzFJ49wJ4Ix3r6OIHFuwiBGswZEVvg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: '>=8.40.0'
+ dependencies:
+ '@stylistic/eslint-plugin-js': 1.5.4([email protected])
+ eslint: 8.56.0
+ estraverse: 5.3.0
+ dev: true
+
+ resolution: {integrity: sha512-dI0Cs5vYX/0uMhQDY+NK0cKQ0Pe9B6jWYxd0Ndud+mNloDaVLrsmJocK4zn+YfhGEDs1E4Nk5uAPZEumIpDuSg==}
+ peerDependencies:
+ eslint: '*'
+ dependencies:
+ '@typescript-eslint/utils': 6.19.0([email protected])([email protected])
+ eslint: 8.56.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
+ resolution: {integrity: sha512-NZDFVIlVNjuPvhT+0Cidm5IS3emtx338xbJTqs2xfOVRDGTpYwRHhNVEGa1rFOpYHmv0sAj6+OXbMDn7ul0K/g==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: '>=8.40.0'
+ dependencies:
+ '@stylistic/eslint-plugin-js': 1.5.4([email protected])
+ '@typescript-eslint/utils': 6.19.0([email protected])([email protected])
+ eslint: 8.56.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
+ resolution: {integrity: sha512-zWPXr+O67GC9KDAFkbL1U9UVqE6Iv69YMKhkIECCmE0GvClUJwdfsimm4XebEDondV7kfjMrTDZaYfrI5aS0Jg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: '>=8.40.0'
+ dependencies:
+ '@stylistic/eslint-plugin-js': 1.5.4([email protected])
+ '@stylistic/eslint-plugin-jsx': 1.5.4([email protected])
+ '@stylistic/eslint-plugin-plus': 1.5.4([email protected])([email protected])
+ '@stylistic/eslint-plugin-ts': 1.5.4([email protected])([email protected])
+ eslint: 8.56.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
/@testing-library/[email protected]:
resolution: {integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==}
engines: {node: '>=14'}
@@ -5372,10 +5542,6 @@ packages:
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
dev: true
- resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
- dev: true
-
resolution: {integrity: sha512-PecSzorDGdabF57OBeQO/xFbAkYWo88g4Xvnsx7LRwqLC17I7OoKtA3bQB9uXkY6UkMWCOsA8HSVpaoitscdXw==}
dev: true
@@ -5384,6 +5550,12 @@ packages:
resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==}
dev: true
+ resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==}
+ dependencies:
+ '@types/unist': 2.0.10
+ dev: true
+
resolution: {integrity: sha512-Rllzc5KHk0Al5/WANwgSPl1/CwjqCy+AZrGd78zuK+jO9aDM6ffblZ+zIjgPNAaEBmlO0RYDvLNh7wD0zKVgEg==}
dev: true
@@ -5539,8 +5711,8 @@ packages:
'@types/yargs-parser': 21.0.3
dev: true
- /@typescript-eslint/[email protected](@typescript-eslint/[email protected])([email protected])([email protected]):
- resolution: {integrity: sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==}
+ /@typescript-eslint/[email protected](@typescript-eslint/[email protected])([email protected])([email protected]):
+ resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
@@ -5551,11 +5723,11 @@ packages:
optional: true
dependencies:
'@eslint-community/regexpp': 4.10.0
- '@typescript-eslint/parser': 6.17.0([email protected])([email protected])
- '@typescript-eslint/scope-manager': 6.17.0
- '@typescript-eslint/type-utils': 6.17.0([email protected])([email protected])
- '@typescript-eslint/utils': 6.17.0([email protected])([email protected])
- '@typescript-eslint/visitor-keys': 6.17.0
+ '@typescript-eslint/parser': 6.19.1([email protected])([email protected])
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/type-utils': 6.19.0([email protected])([email protected])
+ '@typescript-eslint/utils': 6.19.0([email protected])([email protected])
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
graphemer: 1.4.0
@@ -5568,8 +5740,8 @@ packages:
- supports-color
dev: true
- resolution: {integrity: sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==}
+ resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
@@ -5578,10 +5750,10 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 6.17.0
- '@typescript-eslint/types': 6.17.0
- '@typescript-eslint/typescript-estree': 6.17.0([email protected])
- '@typescript-eslint/visitor-keys': 6.17.0
+ '@typescript-eslint/scope-manager': 6.19.1
+ '@typescript-eslint/types': 6.19.1
+ '@typescript-eslint/typescript-estree': 6.19.1([email protected])
+ '@typescript-eslint/visitor-keys': 6.19.1
debug: 4.3.4
eslint: 8.56.0
typescript: 5.3.3
@@ -5597,8 +5769,24 @@ packages:
'@typescript-eslint/visitor-keys': 6.17.0
dev: true
- resolution: {integrity: sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==}
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
+ dev: true
+
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.19.1
+ '@typescript-eslint/visitor-keys': 6.19.1
+ dev: true
+
+ resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
@@ -5607,8 +5795,8 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 6.17.0([email protected])
- '@typescript-eslint/utils': 6.17.0([email protected])([email protected])
+ '@typescript-eslint/typescript-estree': 6.19.0([email protected])
+ '@typescript-eslint/utils': 6.19.0([email protected])([email protected])
debug: 4.3.4
eslint: 8.56.0
ts-api-utils: 1.0.3([email protected])
@@ -5622,6 +5810,16 @@ packages:
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dev: true
+
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dev: true
+
/@typescript-eslint/[email protected]([email protected]):
resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -5644,6 +5842,50 @@ packages:
- supports-color
dev: true
+ /@typescript-eslint/[email protected]([email protected]):
+ resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
+ debug: 4.3.4
+ globby: 11.1.0
+ is-glob: 4.0.3
+ minimatch: 9.0.3
+ semver: 7.5.4
+ ts-api-utils: 1.0.3([email protected])
+ typescript: 5.3.3
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@typescript-eslint/[email protected]([email protected]):
+ resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/types': 6.19.1
+ '@typescript-eslint/visitor-keys': 6.19.1
+ debug: 4.3.4
+ globby: 11.1.0
+ is-glob: 4.0.3
+ minimatch: 9.0.3
+ semver: 7.5.4
+ ts-api-utils: 1.0.3([email protected])
+ typescript: 5.3.3
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -5663,11 +5905,46 @@ packages:
- typescript
dev: true
- /@typescript-eslint/[email protected]:
- resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==}
+ resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==}
engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0
dependencies:
- '@typescript-eslint/types': 6.17.0
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ '@types/json-schema': 7.0.15
+ '@types/semver': 7.5.6
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/typescript-estree': 6.19.0([email protected])
+ eslint: 8.56.0
+ semver: 7.5.4
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.17.0
+ eslint-visitor-keys: 3.4.3
+ dev: true
+
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.19.0
+ eslint-visitor-keys: 3.4.3
+ dev: true
+
+ /@typescript-eslint/[email protected]:
+ resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.19.1
eslint-visitor-keys: 3.4.3
dev: true
@@ -5818,6 +6095,16 @@ packages:
source-map-js: 1.0.2
dev: true
+ resolution: {integrity: sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==}
+ dependencies:
+ '@babel/parser': 7.23.6
+ '@vue/shared': 3.4.15
+ entities: 4.5.0
+ estree-walker: 2.0.2
+ source-map-js: 1.0.2
+ dev: true
+
resolution: {integrity: sha512-zoAiUIqSKqAJ81WhfPXYmFGwDRuO+loqLxvXmfUdR5fOitPoUiIeFI9cTTyv9MU5O1+ZZglJVTusWzy+wfk5hw==}
dependencies:
@@ -5825,6 +6112,34 @@ packages:
'@vue/shared': 3.3.11
dev: true
+ resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==}
+ dependencies:
+ '@vue/compiler-core': 3.4.15
+ '@vue/shared': 3.4.15
+ dev: true
+
+ resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==}
+ dependencies:
+ '@babel/parser': 7.23.6
+ '@vue/compiler-core': 3.4.15
+ '@vue/compiler-dom': 3.4.15
+ '@vue/compiler-ssr': 3.4.15
+ '@vue/shared': 3.4.15
+ estree-walker: 2.0.2
+ magic-string: 0.30.5
+ postcss: 8.4.33
+ source-map-js: 1.0.2
+ dev: true
+
+ resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==}
+ dependencies:
+ '@vue/compiler-dom': 3.4.15
+ '@vue/shared': 3.4.15
+ dev: true
+
resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==}
peerDependencies:
@@ -5849,6 +6164,10 @@ packages:
resolution: {integrity: sha512-u2G8ZQ9IhMWTMXaWqZycnK4UthG1fA238CD+DP4Dm4WJi5hdUKKLg0RMRaRpDPNMdkTwIDkp7WtD0Rd9BH9fLw==}
dev: true
+ resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==}
+ dev: true
+
/@wendellhu/[email protected]:
resolution: {integrity: sha512-fRHMABe4ikrhhLgRQRuK2JQSjRDlBhOqwijBAs8fynfukNo+pbNRDDAVaSw8euarkzDl6COTntOXEbWntbHUnQ==}
dev: false
@@ -5933,6 +6252,12 @@ packages:
hasBin: true
dev: true
+ resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
+ engines: {node: '>=0.4.0'}
+ hasBin: true
+ dev: true
+
resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==}
engines: {node: '>= 10.0.0'}
@@ -6031,6 +6356,11 @@ packages:
resolution: {integrity: sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g==}
dev: true
+ resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==}
+ engines: {node: '>=14'}
+ dev: true
+
resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}
dependencies:
@@ -6085,17 +6415,6 @@ packages:
engines: {node: '>=8'}
dev: true
- resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.5
- define-properties: 1.2.1
- es-abstract: 1.22.3
- es-shim-unscopables: 1.0.2
- get-intrinsic: 1.2.2
- dev: true
-
resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==}
engines: {node: '>= 0.4'}
@@ -6316,6 +6635,10 @@ packages:
- supports-color
dev: true
+ resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
+ dev: true
+
resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==}
engines: {node: '>= 5.10.0'}
@@ -6364,6 +6687,17 @@ packages:
update-browserslist-db: 1.0.13([email protected])
dev: true
+ resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
+ engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
+ hasBin: true
+ dependencies:
+ caniuse-lite: 1.0.30001579
+ electron-to-chromium: 1.4.640
+ node-releases: 2.0.14
+ update-browserslist-db: 1.0.13([email protected])
+ dev: true
+
resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==}
dependencies:
@@ -6385,6 +6719,17 @@ packages:
ieee754: 1.2.1
dev: true
+ resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
+ engines: {node: '>=6'}
+ dev: true
+
+ resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==}
+ dependencies:
+ semver: 7.5.4
+ dev: true
+
resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
engines: {node: '>= 0.8'}
@@ -6446,6 +6791,10 @@ packages:
resolution: {integrity: sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==}
dev: true
+ resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==}
+ dev: true
+
resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==}
engines: {node: '>=4'}
@@ -6481,6 +6830,18 @@ packages:
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
dev: true
+ resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==}
+ dev: true
+
+ resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==}
+ dev: true
+
+ resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==}
+ dev: true
+
resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}
dependencies:
@@ -6516,6 +6877,11 @@ packages:
engines: {node: '>=8'}
dev: true
+ resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==}
+ engines: {node: '>=8'}
+ dev: true
+
resolution: {integrity: sha512-hM1tngsO2Sco+LesFtGHkkemNBJONUKCeY6RU2VqHBE5kDB8SdnCEJ5M3VoG7M7gL5Kx+GFlzaeSCKXEL9pGTA==}
engines: {node: '>=16'}
@@ -6528,6 +6894,13 @@ packages:
resolution: {integrity: sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==}
dev: false
+ resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==}
+ engines: {node: '>=4'}
+ dependencies:
+ escape-string-regexp: 1.0.5
+ dev: true
+
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
engines: {node: '>=6'}
@@ -6660,6 +7033,11 @@ packages:
dev: true
optional: true
+ resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==}
+ engines: {node: '>= 12.0.0'}
+ dev: true
+
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
dev: true
@@ -6711,10 +7089,6 @@ packages:
typedarray: 0.0.6
dev: true
- resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==}
- dev: true
-
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
engines: {node: '>= 0.6'}
@@ -6777,6 +7151,12 @@ packages:
browserslist: 4.22.1
dev: true
+ resolution: {integrity: sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==}
+ dependencies:
+ browserslist: 4.22.2
+ dev: true
+
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
dev: true
@@ -7151,6 +7531,10 @@ packages:
resolution: {integrity: sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==}
dev: true
+ resolution: {integrity: sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==}
+ dev: true
+
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
dev: true
@@ -7174,14 +7558,6 @@ packages:
once: 1.4.0
dev: true
- resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==}
- engines: {node: '>=10.13.0'}
- dependencies:
- graceful-fs: 4.2.11
- tapable: 2.2.1
- dev: true
-
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@@ -7458,43 +7834,29 @@ packages:
source-map: 0.6.1
dev: true
- resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==}
- engines: {node: ^10.12.0 || >=12.0.0}
+ resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==}
+ engines: {node: '>=12'}
peerDependencies:
- eslint: ^7.32.0 || ^8.2.0
- eslint-plugin-import: ^2.25.2
+ eslint: '>=6.0.0'
dependencies:
- confusing-browser-globals: 1.0.11
eslint: 8.56.0
- eslint-plugin-import: 2.29.0(@typescript-eslint/[email protected])([email protected])([email protected])
- object.assign: 4.1.4
- object.entries: 1.1.7
- semver: 6.3.1
dev: true
- resolution: {integrity: sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==}
+ resolution: {integrity: sha512-5N7ZaJG5pZxUeNNJfUchurLVrunD1xJvyg5kYOIVF8kg1f3ajTikmAu/5fZ9w100omNPOoMjngRszh/Q/uFGMg==}
+ engines: {node: '>=12'}
peerDependencies:
- '@typescript-eslint/eslint-plugin': ^5.13.0 || ^6.0.0
- '@typescript-eslint/parser': ^5.0.0 || ^6.0.0
- eslint: ^7.32.0 || ^8.2.0
- eslint-plugin-import: ^2.25.3
+ eslint: '>=6.0.0'
dependencies:
- '@typescript-eslint/eslint-plugin': 6.17.0(@typescript-eslint/[email protected])([email protected])([email protected])
- '@typescript-eslint/parser': 6.17.0([email protected])([email protected])
eslint: 8.56.0
- eslint-config-airbnb-base: 15.0.0([email protected])([email protected])
- eslint-plugin-import: 2.29.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ semver: 7.5.4
dev: true
- resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==}
- hasBin: true
- peerDependencies:
- eslint: '>=7.0.0'
+ resolution: {integrity: sha512-PcBsqtd5QHEZH4ROvpnRN4EP0qcHh9voCCHgtyHxnJZHGspJREcZn7oPqRG/GfWt9m3C0fkC2l5CuBtMig2wXQ==}
dependencies:
- eslint: 8.56.0
+ parse-gitignore: 2.0.0
dev: true
@@ -7507,30 +7869,15 @@ packages:
- supports-color
dev: true
- resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
- engines: {node: ^14.18.0 || >=16.0.0}
+ resolution: {integrity: sha512-IvRXXtEajLeyssvW4wJcZ2etxkR9mUf4zpNwgI+m/Uac9RfXHskuJefkHUcawVzePnd6xp24enp5jfgdHzjRdQ==}
peerDependencies:
eslint: '*'
- eslint-plugin-import: '*'
dependencies:
- debug: 4.3.4
- enhanced-resolve: 5.15.0
eslint: 8.56.0
- eslint-module-utils: 2.8.0(@typescript-eslint/[email protected])([email protected])([email protected])([email protected])
- eslint-plugin-import: 2.29.0(@typescript-eslint/[email protected])([email protected])([email protected])
- fast-glob: 3.3.2
- get-tsconfig: 4.7.2
- is-core-module: 2.13.1
- is-glob: 4.0.3
- transitivePeerDependencies:
- - '@typescript-eslint/parser'
- - eslint-import-resolver-node
- - eslint-import-resolver-webpack
- - supports-color
dev: true
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
@@ -7551,87 +7898,190 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 6.17.0([email protected])([email protected])
+ '@typescript-eslint/parser': 6.19.1([email protected])([email protected])
debug: 3.2.7
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected])([email protected])([email protected])
transitivePeerDependencies:
- supports-color
dev: true
- resolution: {integrity: sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==}
+ resolution: {integrity: sha512-s7ZTOM3uq0iqpp6gF0UEotnvup7f2PHBUftCytLZX0+6C9j9KadKZQh6bVVngAyFgsmeD9+gcBopOYLClb2oDg==}
peerDependencies:
- eslint: '>=7.7.0'
+ eslint: '*'
dependencies:
eslint: 8.56.0
dev: true
- resolution: {integrity: sha512-Lmf/BbK+EQKUfjKPcZpslE/KTGYlgaI8ZJ/sYzdbb3BVTg5+GmLBLHBjsUKNEVRM1SEhDTF/didtOSYKi4tSnQ==}
- engines: {node: '>=10.0.0'}
- hasBin: true
+ resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==}
+ engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
- eslint: '>=6.0.0'
+ eslint: '>=8'
dependencies:
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ '@eslint-community/regexpp': 4.10.0
eslint: 8.56.0
+ eslint-compat-utils: 0.1.2([email protected])
dev: true
- resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==}
- engines: {node: '>=4'}
+ resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==}
+ engines: {node: '>=6.5.0'}
peerDependencies:
- '@typescript-eslint/parser': '*'
- eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
- peerDependenciesMeta:
- '@typescript-eslint/parser':
- optional: true
+ eslint: '>=4.19.1'
+ dependencies:
+ escape-string-regexp: 1.0.5
+ eslint: 8.56.0
+ ignore: 5.3.0
+ dev: true
+
+ resolution: {integrity: sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==}
+ peerDependencies:
+ eslint: '>=7.7.0'
dependencies:
- '@typescript-eslint/parser': 6.17.0([email protected])([email protected])
- array-includes: 3.1.7
- array.prototype.findlastindex: 1.2.3
- array.prototype.flat: 1.3.2
- array.prototype.flatmap: 1.3.2
- debug: 3.2.7
- doctrine: 2.1.0
+ eslint: 8.56.0
+ dev: true
+
+ resolution: {integrity: sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==}
+ engines: {node: '>=12'}
+ peerDependencies:
+ eslint: ^7.2.0 || ^8
+ dependencies:
+ debug: 4.3.4
+ doctrine: 3.0.0
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/[email protected])([email protected])([email protected])([email protected])
- hasown: 2.0.0
- is-core-module: 2.13.1
+ eslint-module-utils: 2.8.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ get-tsconfig: 4.7.2
is-glob: 4.0.3
minimatch: 3.1.2
- object.fromentries: 2.0.7
- object.groupby: 1.0.1
- object.values: 1.1.7
- semver: 6.3.1
- tsconfig-paths: 3.14.2
+ semver: 7.5.4
transitivePeerDependencies:
+ - '@typescript-eslint/parser'
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
dev: true
- resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
- engines: {node: ^14.18.0 || >=16.0.0}
+ resolution: {integrity: sha512-CBFl5Jc7+jlV36RwDm+PQ8Uw5r28pn2/uW/OaB+Gw5bFwn4Py/1eYMZ3hGf9S4meUFZ/sRvS+hVif2mRAp6WqQ==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
+ dependencies:
+ '@es-joy/jsdoccomment': 0.41.0
+ are-docs-informative: 0.0.2
+ comment-parser: 1.4.1
+ debug: 4.3.4
+ escape-string-regexp: 4.0.0
+ eslint: 8.56.0
+ esquery: 1.5.0
+ is-builtin-module: 3.2.1
+ semver: 7.5.4
+ spdx-expression-parse: 4.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ resolution: {integrity: sha512-iv2BLi1bqkSxCPEvDOY6xiBXzAFi5iS2gTOU8fnXGfKxkC6MvC5Tw2XAgbP6R6WRlqV7AtFItx4Xb7mCONtmmw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: '>=6.0.0'
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ eslint: 8.56.0
+ eslint-compat-utils: 0.4.1([email protected])
+ espree: 9.6.1
+ graphemer: 1.4.0
+ jsonc-eslint-parser: 2.4.0
+ natural-compare: 1.4.0
+ dev: true
+
+ resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ dependencies:
+ eslint: 8.56.0
+ mdast-util-from-markdown: 0.8.5
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ eslint: '>=7.0.0'
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ builtins: 5.0.1
+ eslint: 8.56.0
+ eslint-plugin-es-x: 7.5.0([email protected])
+ get-tsconfig: 4.7.2
+ globals: 13.24.0
+ ignore: 5.3.0
+ is-builtin-module: 3.2.1
+ is-core-module: 2.13.1
+ minimatch: 3.1.2
+ resolve: 1.22.8
+ semver: 7.5.4
+ dev: true
+
+ resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==}
+ engines: {node: '>=5.0.0'}
+ dev: true
+
+ resolution: {integrity: sha512-F6XXcq4mKKUe/SREoMGQqzgw6cgCgf3pFzkFfQVIGtqD1yXVpQjnhTepzhBeZfxZwgMzR9HO4yH4CUhIQ2WBcQ==}
peerDependencies:
- '@types/eslint': '>=8.0.0'
+ astro-eslint-parser: ^0.16.0
eslint: '>=8.0.0'
- eslint-config-prettier: '*'
- prettier: '>=3.0.0'
+ svelte: '>=3.0.0'
+ svelte-eslint-parser: ^0.33.0
+ vue-eslint-parser: '>=9.0.0'
peerDependenciesMeta:
- '@types/eslint':
+ astro-eslint-parser:
optional: true
- eslint-config-prettier:
+ svelte:
optional: true
+ svelte-eslint-parser:
+ optional: true
+ vue-eslint-parser:
+ optional: true
+ dependencies:
+ '@typescript-eslint/utils': 6.17.0([email protected])([email protected])
+ eslint: 8.56.0
+ minimatch: 9.0.3
+ natural-compare-lite: 1.4.0
+ vue-eslint-parser: 9.4.1([email protected])
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
+ resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
+ dependencies:
+ eslint: 8.56.0
+ dev: true
+
+ resolution: {integrity: sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==}
+ peerDependencies:
+ eslint: '>=7'
dependencies:
eslint: 8.56.0
- eslint-config-prettier: 9.1.0([email protected])
- prettier: 3.1.1
- prettier-linter-helpers: 1.0.0
- synckit: 0.8.8
dev: true
@@ -7659,15 +8109,49 @@ packages:
string.prototype.matchall: 4.0.10
dev: true
- resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==}
+ resolution: {integrity: sha512-ri0xf63PYf3pIq/WY9BIwrqxZmGTIwSkAO0bHddI0ajUwN4KGz6W8vOvdXFHOpRdRfzxlmXze/vfsY/aTEXESg==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
- eslint: '>=5.0.0'
+ eslint: '>=6.0.0'
dependencies:
+ debug: 4.3.4
eslint: 8.56.0
+ eslint-compat-utils: 0.4.1([email protected])
+ lodash: 4.17.21
+ toml-eslint-parser: 0.9.3
+ transitivePeerDependencies:
+ - supports-color
dev: true
+ resolution: {integrity: sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==}
+ engines: {node: '>=16'}
+ peerDependencies:
+ eslint: '>=8.56.0'
+ dependencies:
+ '@babel/helper-validator-identifier': 7.22.20
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ '@eslint/eslintrc': 2.1.4
+ ci-info: 4.0.0
+ clean-regexp: 1.0.0
+ core-js-compat: 3.35.1
+ eslint: 8.56.0
+ esquery: 1.5.0
+ indent-string: 4.0.0
+ is-builtin-module: 3.2.1
+ jsesc: 3.0.2
+ pluralize: 8.0.0
+ read-pkg-up: 7.0.1
+ regexp-tree: 0.1.27
+ regjsparser: 0.10.0
+ semver: 7.5.4
+ strip-indent: 3.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -7677,11 +8161,76 @@ packages:
'@typescript-eslint/eslint-plugin':
optional: true
dependencies:
- '@typescript-eslint/eslint-plugin': 6.17.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/[email protected])([email protected])([email protected])
eslint: 8.56.0
eslint-rule-composer: 0.3.0
dev: true
+ resolution: {integrity: sha512-O05k4j9TGMOkkghj9dRgpeLDyOSiVIxQWgNDPfhYPm5ioJsehcYV/zkRLekQs+c8+RBCVXucSED3fYOyy2EoWA==}
+ engines: {node: ^18.0.0 || >= 20.0.0}
+ peerDependencies:
+ '@typescript-eslint/eslint-plugin': '*'
+ eslint: '>=8.0.0'
+ vitest: '*'
+ peerDependenciesMeta:
+ '@typescript-eslint/eslint-plugin':
+ optional: true
+ vitest:
+ optional: true
+ dependencies:
+ '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ '@typescript-eslint/utils': 6.17.0([email protected])([email protected])
+ eslint: 8.56.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
+ resolution: {integrity: sha512-GyCs8K3lkEvoyC1VV97GJhP1SvqsKCiWGHnbn0gVUYiUhaH2+nB+Dv1uekv1THFMPbBfYxukrzQdltw950k+LQ==}
+ engines: {node: ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0([email protected])
+ eslint: 8.56.0
+ natural-compare: 1.4.0
+ nth-check: 2.1.1
+ postcss-selector-parser: 6.0.13
+ semver: 7.5.4
+ vue-eslint-parser: 9.4.1([email protected])
+ xml-name-validator: 4.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ resolution: {integrity: sha512-hvS9p08FhPT7i/ynwl7/Wt7ke7Rf4P2D6fT8lZlL43peZDTsHtH2A0SIFQ7Kt7+mJ6if6P+FX3iJhMkdnxQwpg==}
+ engines: {node: ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: '>=6.0.0'
+ dependencies:
+ debug: 4.3.4
+ eslint: 8.56.0
+ eslint-compat-utils: 0.4.1([email protected])
+ lodash: 4.17.21
+ natural-compare: 1.4.0
+ yaml-eslint-parser: 1.2.2
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ resolution: {integrity: sha512-9+dU5lU881log570oBwpelaJmOfOzSniben7IWEDRYQPPWwlvaV7NhOtsTuUWDqpYT+dtKKWPsgz4OkOi+aZnA==}
+ peerDependencies:
+ '@vue/compiler-sfc': ^3.3.0
+ eslint: ^8.50.0
+ dependencies:
+ '@vue/compiler-sfc': 3.4.15
+ eslint: 8.56.0
+ dev: true
+
resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==}
engines: {node: '>=4.0.0'}
@@ -7887,10 +8436,6 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
- resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
- dev: true
-
resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==}
engines: {node: '>=8.6.0'}
@@ -8349,6 +8894,13 @@ packages:
type-fest: 0.20.2
dev: true
+ resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
+ engines: {node: '>=8'}
+ dependencies:
+ type-fest: 0.20.2
+ dev: true
+
resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
engines: {node: '>= 0.4'}
@@ -8673,6 +9225,17 @@ packages:
engines: {node: '>=8'}
dev: true
+ resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==}
+ dev: true
+
+ resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==}
+ dependencies:
+ is-alphabetical: 1.0.4
+ is-decimal: 1.0.4
+ dev: true
+
resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==}
engines: {node: '>= 0.4'}
@@ -8721,6 +9284,13 @@ packages:
has-tostringtag: 1.0.0
dev: true
+ resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==}
+ engines: {node: '>=6'}
+ dependencies:
+ builtin-modules: 3.3.0
+ dev: true
+
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
engines: {node: '>= 0.4'}
@@ -8739,6 +9309,10 @@ packages:
has-tostringtag: 1.0.0
dev: true
+ resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==}
+ dev: true
+
resolution: {integrity: sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ==}
dev: true
@@ -8796,6 +9370,10 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==}
+ dev: true
+
resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==}
engines: {node: '>=8'}
@@ -9172,6 +9750,11 @@ packages:
- supports-color
dev: true
+ resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==}
+ engines: {node: '>=12.0.0'}
+ dev: true
+
resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==}
hasBin: true
@@ -9183,6 +9766,12 @@ packages:
hasBin: true
dev: true
+ resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
+ engines: {node: '>=6'}
+ hasBin: true
+ dev: true
+
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
dev: true
@@ -9203,19 +9792,22 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true
- resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
- hasBin: true
- dependencies:
- minimist: 1.2.8
- dev: true
-
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
hasBin: true
dev: true
+ resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ acorn: 8.11.2
+ eslint-visitor-keys: 3.4.3
+ espree: 9.6.1
+ semver: 7.5.4
+ dev: true
+
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
dev: true
@@ -9612,10 +10204,26 @@ packages:
unist-util-visit: 2.0.3
dev: true
+ resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==}
+ dependencies:
+ '@types/mdast': 3.0.15
+ mdast-util-to-string: 2.0.0
+ micromark: 2.11.4
+ parse-entities: 2.0.0
+ unist-util-stringify-position: 2.0.3
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==}
dev: true
+ resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==}
+ dev: true
+
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
dev: true
@@ -9689,6 +10297,15 @@ packages:
engines: {node: '>= 0.6'}
dev: true
+ resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==}
+ dependencies:
+ debug: 4.3.4
+ parse-entities: 2.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
engines: {node: '>=8.6'}
@@ -9858,6 +10475,10 @@ packages:
hasBin: true
dev: false
+ resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
+ dev: true
+
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true
@@ -9916,6 +10537,10 @@ packages:
resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==}
dev: true
+ resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
+ dev: true
+
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
dependencies:
@@ -9954,6 +10579,12 @@ packages:
path-key: 4.0.0
dev: true
+ resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
+ dependencies:
+ boolbase: 1.0.0
+ dev: true
+
resolution: {integrity: sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==}
dev: false
@@ -10011,15 +10642,6 @@ packages:
es-abstract: 1.22.3
dev: true
- resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==}
- dependencies:
- call-bind: 1.0.5
- define-properties: 1.2.1
- es-abstract: 1.22.3
- get-intrinsic: 1.2.2
- dev: true
-
resolution: {integrity: sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==}
dependencies:
@@ -10168,6 +10790,22 @@ packages:
callsites: 3.1.0
dev: true
+ resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==}
+ dependencies:
+ character-entities: 1.2.4
+ character-entities-legacy: 1.1.4
+ character-reference-invalid: 1.1.4
+ is-alphanumerical: 1.0.4
+ is-decimal: 1.0.4
+ is-hexadecimal: 1.0.4
+ dev: true
+
+ resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==}
+ engines: {node: '>=14'}
+ dev: true
+
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
@@ -10328,6 +10966,11 @@ packages:
fsevents: 2.3.2
dev: true
+ resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
+ engines: {node: '>=4'}
+ dev: true
+
resolution: {integrity: sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==}
engines: {node: '>=10'}
@@ -10335,13 +10978,13 @@ packages:
'@babel/runtime': 7.23.4
dev: true
resolution: {integrity: sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==}
engines: {node: '>=12'}
peerDependencies:
postcss: ^8.3.5
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.33
dev: true
@@ -10452,18 +11095,20 @@ packages:
source-map-js: 1.0.2
dev: true
+ resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==}
+ engines: {node: ^10 || ^12 || >=14}
+ dependencies:
+ nanoid: 3.3.7
+ picocolors: 1.0.0
+ source-map-js: 1.0.2
+ dev: true
+
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
dev: true
- resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
- engines: {node: '>=6.0.0'}
- dependencies:
- fast-diff: 1.3.0
- dev: true
-
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
@@ -11217,6 +11862,11 @@ packages:
'@babel/runtime': 7.23.4
dev: true
+ resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==}
+ hasBin: true
+ dev: true
+
resolution: {integrity: sha512-HbLDPF+RkBiPjlzmU0hnUQd4abs56JiA2riHxNVfxjagcGwIy3Xhc2Yyx2+0/p5QeM0kj270nEOlTj57HvWXFA==}
engines: {node: '>=16'}
@@ -11245,6 +11895,13 @@ packages:
unicode-match-property-value-ecmascript: 2.1.0
dev: true
+ resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==}
+ hasBin: true
+ dependencies:
+ jsesc: 0.5.0
+ dev: true
+
resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==}
hasBin: true
@@ -11666,6 +12323,13 @@ packages:
spdx-license-ids: 3.0.16
dev: true
+ resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==}
+ dependencies:
+ spdx-exceptions: 2.3.0
+ spdx-license-ids: 3.0.16
+ dev: true
+
resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==}
dev: true
@@ -11826,11 +12490,6 @@ packages:
ansi-regex: 6.0.1
dev: true
- resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
- engines: {node: '>=4'}
- dev: true
-
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
@@ -11889,7 +12548,7 @@ packages:
stylelint: 15.11.0([email protected])
dev: true
resolution: {integrity: sha512-6X5A9kdusuLzS/9yfkQfzYg5ry43KHXMnUmiPCIidwQEW/cegn44CtRPfN+9SLcVkUVcRNpuLYfHtbLtoUHgkA==}
peerDependencies:
postcss: ^8.3.3
@@ -11898,11 +12557,11 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
- postcss-less: 6.0.0([email protected])
+ postcss: 8.4.33
+ postcss-less: 6.0.0([email protected])
stylelint: 15.11.0([email protected])
stylelint-config-recommended: 13.0.0([email protected])
- stylelint-less: 2.0.0([email protected])([email protected])
+ stylelint-less: 2.0.0([email protected])([email protected])
dev: true
@@ -11914,7 +12573,7 @@ packages:
stylelint: 15.11.0([email protected])
dev: true
resolution: {integrity: sha512-hLrK5oNV2Ombs0IC11gzGsYtADX8dquevs+Ls2jY4IY2wywPLnUSW5a5ofxXVan1j1z6OMcs8fWikbpj9Y5VgQ==}
peerDependencies:
postcss: ^8.3.3
@@ -11923,9 +12582,9 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.33
stylelint: 15.11.0([email protected])
- stylelint-config-recommended-less: 2.0.0([email protected])([email protected])
+ stylelint-config-recommended-less: 2.0.0([email protected])([email protected])
stylelint-config-standard: 34.0.0([email protected])
dev: true
@@ -11939,13 +12598,13 @@ packages:
stylelint-config-recommended: 13.0.0([email protected])
dev: true
resolution: {integrity: sha512-HwRdAdrNDBg64BzIOP3SSHFPJHvRJEpqFn8Kp5m5Enw6pf7kI9XoNT3jn1S2zvfzaK/7hdwy6La3cyJT78fK3A==}
peerDependencies:
postcss: ^8.4.14
stylelint: ^15.10.3
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.33
postcss-resolve-nested-selector: 0.1.1
postcss-value-parser: 4.2.0
stylelint: 15.11.0([email protected])
@@ -12053,14 +12712,6 @@ packages:
resolution: {integrity: sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==}
dev: true
- resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
- engines: {node: ^14.18.0 || >=16.0.0}
- dependencies:
- '@pkgr/core': 0.1.0
- tslib: 2.6.2
- dev: true
-
resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==}
engines: {node: '>=10.0.0'}
@@ -12072,11 +12723,6 @@ packages:
strip-ansi: 6.0.1
dev: true
- resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
- engines: {node: '>=6'}
- dev: true
-
resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
dependencies:
@@ -12220,6 +12866,13 @@ packages:
engines: {node: '>=0.6'}
dev: true
+ resolution: {integrity: sha512-moYoCvkNUAPCxSW9jmHmRElhm4tVJpHL8ItC/+uYD0EpPSFXbck7yREz9tNdJVTSpHVod8+HoipcpbQ0oE6gsw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ eslint-visitor-keys: 3.4.3
+ dev: true
+
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: true
@@ -12248,15 +12901,6 @@ packages:
engines: {node: '>=6.10'}
dev: true
- resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==}
- dependencies:
- '@types/json5': 0.0.29
- json5: 1.0.2
- minimist: 1.2.8
- strip-bom: 3.0.0
- dev: true
-
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
dev: true
@@ -12504,6 +13148,12 @@ packages:
resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==}
dev: true
+ resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==}
+ dependencies:
+ '@types/unist': 2.0.10
+ dev: true
+
resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==}
dependencies:
@@ -12559,6 +13209,17 @@ packages:
picocolors: 1.0.0
dev: true
+ resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
+ hasBin: true
+ peerDependencies:
+ browserslist: '>= 4.21.0'
+ dependencies:
+ browserslist: 4.22.2
+ escalade: 3.1.1
+ picocolors: 1.0.0
+ dev: true
+
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:
@@ -12656,7 +13317,7 @@ packages:
debug: 4.3.4
pathe: 1.1.1
picocolors: 1.0.0
- vite: 5.0.10(@types/[email protected])([email protected])
+ vite: 5.0.12(@types/[email protected])([email protected])
transitivePeerDependencies:
- '@types/node'
- less
@@ -12698,7 +13359,7 @@ packages:
peerDependencies:
vite: '>=2.0.0'
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
es-module-lexer: 0.4.1
fs-extra: 10.1.0
magic-string: 0.25.9
@@ -12735,7 +13396,7 @@ packages:
dependencies:
'@types/node': 20.10.6
esbuild: 0.18.20
- postcss: 8.4.32
+ postcss: 8.4.33
rollup: 3.29.4
optionalDependencies:
fsevents: 2.3.3
@@ -12772,7 +13433,44 @@ packages:
'@types/node': 20.10.6
esbuild: 0.19.10
less: 4.2.0
- postcss: 8.4.32
+ postcss: 8.4.33
+ rollup: 4.5.2
+ optionalDependencies:
+ fsevents: 2.3.3
+ dev: true
+
+ resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': ^18.0.0 || >=20.0.0
+ less: '*'
+ lightningcss: ^1.21.0
+ sass: '*'
+ stylus: '*'
+ sugarss: '*'
+ terser: ^5.4.0
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ less:
+ optional: true
+ lightningcss:
+ optional: true
+ sass:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+ dependencies:
+ '@types/node': 20.10.6
+ esbuild: 0.19.10
+ less: 4.2.0
+ postcss: 8.4.33
rollup: 4.5.2
optionalDependencies:
fsevents: 2.3.3
@@ -12823,7 +13521,7 @@ packages:
strip-literal: 1.3.0
tinybench: 2.5.1
tinypool: 0.8.1
- vite: 5.0.10(@types/[email protected])([email protected])
+ vite: 5.0.12(@types/[email protected])([email protected])
vite-node: 1.1.1(@types/[email protected])([email protected])
why-is-node-running: 2.2.2
transitivePeerDependencies:
@@ -12881,7 +13579,7 @@ packages:
strip-literal: 1.3.0
tinybench: 2.5.1
tinypool: 0.8.1
- vite: 5.0.10(@types/[email protected])([email protected])
+ vite: 5.0.12(@types/[email protected])([email protected])
vite-node: 1.1.1(@types/[email protected])([email protected])
why-is-node-running: 2.2.2
transitivePeerDependencies:
@@ -12894,6 +13592,24 @@ packages:
- terser
dev: true
+ resolution: {integrity: sha512-EmIbJ5cCI/E06SlI8K5sldVZ+Ef5vy26Ck0lNALxgY7FEAMOjNR32qcsVM3FUJUbvVWTBEiOy5lQvbhPK/ynBw==}
+ engines: {node: ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: '>=6.0.0'
+ dependencies:
+ debug: 4.3.4
+ eslint: 8.56.0
+ eslint-scope: 7.2.2
+ eslint-visitor-keys: 3.4.3
+ espree: 9.6.1
+ esquery: 1.5.0
+ lodash: 4.17.21
+ semver: 7.5.4
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-yQxjxMptBL7UAog00O8sANud99C6wJF+7kgbcwqkvA38vCGF7HWE66w0ZFnS/kX5gSoJr/PQ4/oS3Ne2pW37Og==}
dependencies:
@@ -13128,6 +13844,11 @@ packages:
optional: true
dev: true
+ resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==}
+ engines: {node: '>=12'}
+ dev: true
+
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -13146,6 +13867,15 @@ packages:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true
+ resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==}
+ engines: {node: ^14.17.0 || >=16.0.0}
+ dependencies:
+ eslint-visitor-keys: 3.4.3
+ lodash: 4.17.21
+ yaml: 2.3.4
+ dev: true
+
resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==}
engines: {node: '>= 14'}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index eb7d4d6959..4bec9098f6 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,4 +1,4 @@
packages:
- # all packages in sub dirs of packages/ and Components/
+ - ./common/*
- ./packages/*
- ./examples
diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json
deleted file mode 100644
index af88c91dbb..0000000000
--- a/tsconfig.eslint.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "allowJs": true
- },
- "include": ["."],
- "exclude": [
- "**/node_modules",
- "**/local",
- "**/lib",
- ]
-}
diff --git a/tsconfig.json b/tsconfig.json
deleted file mode 100644
index 067b0c6ec0..0000000000
--- a/tsconfig.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "compilerOptions": {
- "rootDir": ".",
- "outDir": "lib",
- "forceConsistentCasingInFileNames": true,
- "lib": ["ESNext", "DOM", "WebWorker", "dom.iterable"],
- "target": "ESNext",
- "module": "ESNext",
- "experimentalDecorators": true,
- "esModuleInterop": true,
- "jsx": "react",
- "allowSyntheticDefaultImports": true,
- "downlevelIteration": true,
- "sourceMap": true,
- "resolveJsonModule": true,
- "moduleResolution": "Bundler",
- "strict": true,
- "strictPropertyInitialization": true,
- "noImplicitOverride": true,
- "allowJs": false,
- "checkJs": false,
- "skipLibCheck": true,
- "isolatedModules": true,
- "types": ["node"]
- },
- "include": [],
- "references": [
- {
- "path": "./packages/core"
- },
- {
- "path": "./packages/design"
- },
- {
- "path": "./packages/docs"
- },
- {
- "path": "./packages/docs-ui"
- },
- {
- "path": "./packages/engine-formula"
- },
- {
- "path": "./packages/engine-numfmt"
- },
- {
- "path": "./packages/engine-render"
- },
- {
- "path": "./packages/facade"
- },
- {
- "path": "./packages/find-replace"
- },
- {
- "path": "./packages/image"
- },
- {
- "path": "./packages/network"
- },
- {
- "path": "./packages/rpc"
- },
- {
- "path": "./packages/sheets"
- },
- {
- "path": "./packages/sheets-find-replace"
- },
- {
- "path": "./packages/sheets-formula"
- },
- {
- "path": "./packages/sheets-import-xlsx"
- },
- {
- "path": "./packages/sheets-numfmt"
- },
- {
- "path": "./packages/sheets-ui"
- },
- {
- "path": "./packages/sheets-zen-editor"
- },
- {
- "path": "./packages/slides"
- },
- {
- "path": "./packages/slides-ui"
- },
- {
- "path": "./packages/ui"
- },
- {
- "path": "./packages/uniscript"
- },
- {
- "path": "./examples"
- }
- ]
-}
diff --git a/turbo.json b/turbo.json
index a272843cc5..d7b682e44f 100644
--- a/turbo.json
+++ b/turbo.json
@@ -8,6 +8,7 @@
"build:demo": {},
"dev:demo": {
"cache": false
- }
+ },
+ "lint:types": {}
}
}