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: add eslint rules for react & ts (#587)

白熱4906b43e6cd5
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index cbd9e0043c..078d66f738 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -5,7 +5,15 @@ module.exports = {
es2021: true,
},
parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint', 'prettier', 'import', 'import-newlines', 'unused-imports', 'simple-import-sort'],
+ plugins: [
+ '@typescript-eslint',
+ 'prettier',
+ 'import',
+ 'import-newlines',
+ 'unused-imports',
+ 'simple-import-sort',
+ 'react',
+ ],
extends: [
'airbnb-base', // https://www.npmjs.com/package/eslint-config-airbnb-base
'airbnb-typescript/base', // https://www.npmjs.com/package/eslint-config-airbnb-typescript
@@ -129,6 +137,15 @@ module.exports = {
'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,
+ html: true,
+ },
+ ],
},
// https://www.npmjs.com/package/eslint-import-resolver-typescript
settings: {
diff --git a/esbuild.config.mjs b/esbuild.config.mjs
index 77fc035ef8..a95c35ecf3 100644
--- a/esbuild.config.mjs
+++ b/esbuild.config.mjs
@@ -19,7 +19,6 @@ export default {
entryPoints: ['./src/index.ts'],
define: { 'process.env.NODE_ENV': '"production"' },
packages: 'external',
- logLevel: 'verbose',
};
export async function postBuild(format) {
diff --git a/package.json b/package.json
index b02ca1225f..9b25fee23a 100644
--- a/package.json
+++ b/package.json
@@ -54,6 +54,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import-newlines": "^1.3.4",
"eslint-plugin-prettier": "^5.0.1",
+ "eslint-plugin-react": "^7.33.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
diff --git a/packages/base-docs/src/types/index.d.ts b/packages/base-docs/src/types/index.d.ts
deleted file mode 100644
index 8fe66e943f..0000000000
--- a/packages/base-docs/src/types/index.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from '../index';
-declare module '@univerjs/base-docs' {}
diff --git a/packages/base-ui/src/components/custom-label/CustomLabel.tsx b/packages/base-ui/src/components/custom-label/CustomLabel.tsx
index 2f86b9b260..6c2615454f 100644
--- a/packages/base-ui/src/components/custom-label/CustomLabel.tsx
+++ b/packages/base-ui/src/components/custom-label/CustomLabel.tsx
@@ -2,10 +2,11 @@ import { TinyColor } from '@ctrl/tinycolor';
import { LocaleService } from '@univerjs/core';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React from 'react';
-import { isObservable, Observable } from 'rxjs';
+import type { Observable } from 'rxjs';
+import { isObservable } from 'rxjs';
import { ComponentManager } from '../../common/component-manager';
-import { IMenuSelectorItem } from '../../services/menu/menu';
+import type { IMenuSelectorItem } from '../../services/menu/menu';
import { useObservable } from '../hooks/observable';
export type ICustomLabelProps<T = undefined> = {
diff --git a/packages/base-ui/src/components/menu/Menu.tsx b/packages/base-ui/src/components/menu/Menu.tsx
index 8eb2c71000..933e54c8d3 100644
--- a/packages/base-ui/src/components/menu/Menu.tsx
+++ b/packages/base-ui/src/components/menu/Menu.tsx
@@ -11,16 +11,15 @@ import clsx from 'clsx';
import React, { useState } from 'react';
import { isObservable, of } from 'rxjs';
-import {
+import type {
IDisplayMenuItem,
IMenuButtonItem,
IMenuItem,
IMenuSelectorItem,
IValueOption,
- MenuGroup,
MenuItemDefaultValueType,
- MenuItemType,
} from '../../services/menu/menu';
+import { MenuGroup, MenuItemType } from '../../services/menu/menu';
import { IMenuService } from '../../services/menu/menu.service';
import { CustomLabel } from '../custom-label/CustomLabel';
import { useObservable } from '../hooks/observable';
diff --git a/packages/base-ui/src/components/notification/Notification.tsx b/packages/base-ui/src/components/notification/Notification.tsx
index 4f7f797877..f3e928b206 100644
--- a/packages/base-ui/src/components/notification/Notification.tsx
+++ b/packages/base-ui/src/components/notification/Notification.tsx
@@ -2,7 +2,7 @@ import { ConfigContext } from '@univerjs/design';
import { CloseSingle, ErrorSingle, SuccessSingle, WarningSingle } from '@univerjs/icons';
import clsx from 'clsx';
import { useNotification } from 'rc-notification';
-import { Placement } from 'rc-notification/es/interface';
+import type { Placement } from 'rc-notification/es/interface';
import React, { useContext, useEffect, useRef } from 'react';
import { Subject } from 'rxjs';
diff --git a/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx b/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx
index 71d33a297d..79fa2c9f01 100644
--- a/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx
+++ b/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx
@@ -1,14 +1,18 @@
import { IRenderManagerService } from '@univerjs/base-render';
import { Disposable, LifecycleService, LifecycleStages, toDisposable } from '@univerjs/core';
-import { IDisposable, Inject, Injector } from '@wendellhu/redi';
+import type { IDisposable } from '@wendellhu/redi';
+import { Inject, Injector } from '@wendellhu/redi';
import { connectInjector } from '@wendellhu/redi/react-bindings';
import { render as createRoot, unmount } from 'rc-util/lib/React/render';
-import React, { ComponentType } from 'react';
-import { Observable, Subject } from 'rxjs';
+import type { ComponentType } from 'react';
+import React from 'react';
+import type { Observable } from 'rxjs';
+import { Subject } from 'rxjs';
import { IFocusService } from '../../services/focus/focus.service';
import { App } from '../../views/App';
-import { IUIController, IWorkbenchOptions } from './ui.controller';
+import type { IWorkbenchOptions } from './ui.controller';
+import { IUIController } from './ui.controller';
export enum DesktopUIPart {
HEADER = 'header',
diff --git a/packages/base-ui/src/views/App.tsx b/packages/base-ui/src/views/App.tsx
index cad9a50028..8435260639 100644
--- a/packages/base-ui/src/views/App.tsx
+++ b/packages/base-ui/src/views/App.tsx
@@ -1,10 +1,12 @@
import { LocaleService, ThemeService } from '@univerjs/core';
-import { ConfigProvider, defaultTheme, ILocale, themeInstance } from '@univerjs/design';
+import type { ILocale } from '@univerjs/design';
+import { ConfigProvider, defaultTheme, themeInstance } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
import clsx from 'clsx';
-import React, { ComponentType, useEffect, useMemo, useRef, useState } from 'react';
+import type { ComponentType } from 'react';
+import React, { useEffect, useMemo, useRef, useState } from 'react';
-import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
+import type { IWorkbenchOptions } from '../controllers/ui/ui.controller';
import { IMessageService } from '../services/message/message.service';
import { ISidebarService } from '../services/sidebar/sidebar.service';
import styles from './app.module.less';
diff --git a/packages/base-ui/src/views/components/ComponentContainer.tsx b/packages/base-ui/src/views/components/ComponentContainer.tsx
index 9b54e6747c..dde97eab33 100644
--- a/packages/base-ui/src/views/components/ComponentContainer.tsx
+++ b/packages/base-ui/src/views/components/ComponentContainer.tsx
@@ -1,4 +1,5 @@
-import React, { ComponentType } from 'react';
+import type { ComponentType } from 'react';
+import React from 'react';
export function ComponentContainer(props: { components?: Set<() => ComponentType> }) {
const { components } = props;
diff --git a/packages/base-ui/src/views/components/confirm-part/ConfirmPart.tsx b/packages/base-ui/src/views/components/confirm-part/ConfirmPart.tsx
index 82f94808b7..d2bcb59311 100644
--- a/packages/base-ui/src/views/components/confirm-part/ConfirmPart.tsx
+++ b/packages/base-ui/src/views/components/confirm-part/ConfirmPart.tsx
@@ -1,10 +1,11 @@
-import { Confirm, IConfirmProps } from '@univerjs/design';
+import type { IConfirmProps } from '@univerjs/design';
+import { Confirm } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
import { CustomLabel } from '../../../components/custom-label/CustomLabel';
import { IConfirmService } from '../../../services/confirm/confirm.service';
-import { IConfirmPartMethodOptions } from './interface';
+import type { IConfirmPartMethodOptions } from './interface';
export function ConfirmPart() {
const confirmService = useDependency(IConfirmService);
diff --git a/packages/base-ui/src/views/components/context-menu/ContextMenu.tsx b/packages/base-ui/src/views/components/context-menu/ContextMenu.tsx
index e2031110c8..be44a513cc 100644
--- a/packages/base-ui/src/views/components/context-menu/ContextMenu.tsx
+++ b/packages/base-ui/src/views/components/context-menu/ContextMenu.tsx
@@ -1,4 +1,4 @@
-import { IMouseEvent } from '@univerjs/base-render';
+import type { IMouseEvent } from '@univerjs/base-render';
import { ICommandService } from '@univerjs/core';
import { Popup } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
diff --git a/packages/base-ui/src/views/components/dialog-part/DialogPart.tsx b/packages/base-ui/src/views/components/dialog-part/DialogPart.tsx
index 618e44d19c..41e522d2c9 100644
--- a/packages/base-ui/src/views/components/dialog-part/DialogPart.tsx
+++ b/packages/base-ui/src/views/components/dialog-part/DialogPart.tsx
@@ -1,10 +1,11 @@
-import { Dialog, IDialogProps } from '@univerjs/design';
+import type { IDialogProps } from '@univerjs/design';
+import { Dialog } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
import { CustomLabel } from '../../../components/custom-label/CustomLabel';
import { IDialogService } from '../../../services/dialog/dialog.service';
-import { IDialogPartMethodOptions } from './interface';
+import type { IDialogPartMethodOptions } from './interface';
export function DialogPart() {
const dialogService = useDependency(IDialogService);
diff --git a/packages/base-ui/src/views/components/doc-bars/MenuBar.tsx b/packages/base-ui/src/views/components/doc-bars/MenuBar.tsx
index 02bcfe5e63..244388dcc6 100644
--- a/packages/base-ui/src/views/components/doc-bars/MenuBar.tsx
+++ b/packages/base-ui/src/views/components/doc-bars/MenuBar.tsx
@@ -1,13 +1,15 @@
import { LocaleService } from '@univerjs/core';
import { useDependency } from '@wendellhu/redi/react-bindings';
import clsx from 'clsx';
-import React, { ComponentType, useEffect, useState } from 'react';
+import type { ComponentType } from 'react';
+import React, { useEffect, useState } from 'react';
import { useObservable } from '../../../components/hooks/observable';
import { MenuPosition } from '../../../services/menu/menu';
import { IMenuService } from '../../../services/menu/menu.service';
import { ComponentContainer } from '../ComponentContainer';
-import { IMenuGroup, position$, positions, setPosition } from './hooks/menu';
+import type { IMenuGroup } from './hooks/menu';
+import { position$, positions, setPosition } from './hooks/menu';
import styles from './index.module.less';
export interface IMenuBarProps {
diff --git a/packages/base-ui/src/views/components/doc-bars/Toolbar.tsx b/packages/base-ui/src/views/components/doc-bars/Toolbar.tsx
index fde3869032..b2fb19a8f4 100644
--- a/packages/base-ui/src/views/components/doc-bars/Toolbar.tsx
+++ b/packages/base-ui/src/views/components/doc-bars/Toolbar.tsx
@@ -2,9 +2,11 @@ import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
import { useObservable } from '../../../components/hooks/observable';
-import { IDisplayMenuItem, IMenuItem, MenuGroup, MenuPosition } from '../../../services/menu/menu';
+import type { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
+import { MenuGroup, MenuPosition } from '../../../services/menu/menu';
import { IMenuService } from '../../../services/menu/menu.service';
-import { IMenuGroup, position$, positions } from './hooks/menu';
+import type { IMenuGroup } from './hooks/menu';
+import { position$, positions } from './hooks/menu';
import styles from './index.module.less';
import { ToolbarItem } from './ToolbarItem';
diff --git a/packages/base-ui/src/views/components/doc-bars/ToolbarItem.tsx b/packages/base-ui/src/views/components/doc-bars/ToolbarItem.tsx
index f1cfed01f4..c120a2eb0e 100644
--- a/packages/base-ui/src/views/components/doc-bars/ToolbarItem.tsx
+++ b/packages/base-ui/src/views/components/doc-bars/ToolbarItem.tsx
@@ -3,19 +3,15 @@ import { Dropdown, Tooltip } from '@univerjs/design';
import { MoreDownSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
-import { isObservable, Subscription } from 'rxjs';
+import type { Subscription } from 'rxjs';
+import { isObservable } from 'rxjs';
import { ComponentManager } from '../../../common/component-manager';
import { CustomLabel } from '../../../components/custom-label/CustomLabel';
import { useObservable } from '../../../components/hooks/observable';
import { Menu } from '../../../components/menu/Menu';
-import {
- IDisplayMenuItem,
- IMenuItem,
- IMenuSelectorItem,
- IValueOption,
- MenuItemType,
-} from '../../../services/menu/menu';
+import type { IDisplayMenuItem, IMenuItem, IMenuSelectorItem, IValueOption } from '../../../services/menu/menu';
+import { MenuItemType } from '../../../services/menu/menu';
import { ToolbarButton } from './Button/ToolbarButton';
import styles from './index.module.less';
diff --git a/packages/base-ui/src/views/components/sidebar/Sidebar.tsx b/packages/base-ui/src/views/components/sidebar/Sidebar.tsx
index 7550478d2d..e1587189fe 100644
--- a/packages/base-ui/src/views/components/sidebar/Sidebar.tsx
+++ b/packages/base-ui/src/views/components/sidebar/Sidebar.tsx
@@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import { CustomLabel } from '../../../components/custom-label/CustomLabel';
import { ISidebarService } from '../../../services/sidebar/sidebar.service';
import styles from './index.module.less';
-import { ISidebarMethodOptions } from './interface';
+import type { ISidebarMethodOptions } from './interface';
export function Sidebar() {
const sidebarService = useDependency(ISidebarService);
diff --git a/packages/design/src/components/checkbox-group/CheckboxGroup.tsx b/packages/design/src/components/checkbox-group/CheckboxGroup.tsx
index 0f8c125965..8929fc56f7 100644
--- a/packages/design/src/components/checkbox-group/CheckboxGroup.tsx
+++ b/packages/design/src/components/checkbox-group/CheckboxGroup.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import { ICheckboxProps } from '../checkbox/Checkbox';
+import type { ICheckboxProps } from '../checkbox/Checkbox';
import styles from './index.module.less';
export interface ICheckboxGroupProps {
diff --git a/packages/design/src/components/color-picker/ColorPicker.tsx b/packages/design/src/components/color-picker/ColorPicker.tsx
index 6202596db5..b3ab7f88fa 100644
--- a/packages/design/src/components/color-picker/ColorPicker.tsx
+++ b/packages/design/src/components/color-picker/ColorPicker.tsx
@@ -1,4 +1,5 @@
-import RcColorPicker, { Color, ColorBlock } from '@rc-component/color-picker';
+import type { Color } from '@rc-component/color-picker';
+import RcColorPicker, { ColorBlock } from '@rc-component/color-picker';
import React from 'react';
import styles from './index.module.less';
diff --git a/packages/design/src/components/config-provider/ConfigProvider.tsx b/packages/design/src/components/config-provider/ConfigProvider.tsx
index f89d9164d2..eb829fce6e 100644
--- a/packages/design/src/components/config-provider/ConfigProvider.tsx
+++ b/packages/design/src/components/config-provider/ConfigProvider.tsx
@@ -1,6 +1,7 @@
import React, { createContext } from 'react';
-import { enUS, ILocale } from '../../locale';
+import type { ILocale } from '../../locale';
+import { enUS } from '../../locale';
export interface IConfigProviderProps {
children: React.ReactNode;
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 bf16bc9fbc..85cc6fdd39 100644
--- a/packages/design/src/components/config-provider/__tests__/index.spec.tsx
+++ b/packages/design/src/components/config-provider/__tests__/index.spec.tsx
@@ -2,7 +2,8 @@ import { render } from '@testing-library/react';
import React, { useContext } from 'react';
import { describe, expect, test } from 'vitest';
-import { enUS, ILocale, zhCN } from '../../../locale';
+import type { ILocale } from '../../../locale';
+import { enUS, zhCN } from '../../../locale';
import { ConfigContext, ConfigProvider } from '../ConfigProvider';
describe('ConfigProvider', () => {
diff --git a/packages/design/src/components/container/Container.tsx b/packages/design/src/components/container/Container.tsx
index d80a264782..ae5e1b3091 100644
--- a/packages/design/src/components/container/Container.tsx
+++ b/packages/design/src/components/container/Container.tsx
@@ -1,4 +1,5 @@
-import React, { forwardRef, Ref } from 'react';
+import type { Ref } from 'react';
+import React, { forwardRef } from 'react';
export interface IContainerProps {
children?: React.ReactNode;
diff --git a/packages/design/src/components/dropdown/Dropdown.tsx b/packages/design/src/components/dropdown/Dropdown.tsx
index d6c1ba6122..79c5dd4bb2 100644
--- a/packages/design/src/components/dropdown/Dropdown.tsx
+++ b/packages/design/src/components/dropdown/Dropdown.tsx
@@ -1,6 +1,6 @@
import type { ActionType, AlignType } from '@rc-component/trigger';
import RcDropdown from 'rc-dropdown';
-import Placements from 'rc-dropdown/lib/placements';
+import type Placements from 'rc-dropdown/lib/placements';
import React, { useContext } from 'react';
import { ConfigContext } from '../config-provider/ConfigProvider';
diff --git a/packages/design/src/components/menu/Menu.tsx b/packages/design/src/components/menu/Menu.tsx
index a1a8883c50..7e89fb1010 100644
--- a/packages/design/src/components/menu/Menu.tsx
+++ b/packages/design/src/components/menu/Menu.tsx
@@ -1,12 +1,5 @@
-import RcMenu, {
- MenuItem as RcMenuItem,
- MenuItemGroup as RcMenuItemGroup,
- MenuItemGroupProps,
- MenuItemProps,
- MenuProps,
- SubMenu as RcSubMenu,
- SubMenuProps,
-} from 'rc-menu';
+import type { MenuItemGroupProps, MenuItemProps, MenuProps, SubMenuProps } from 'rc-menu';
+import RcMenu, { MenuItem as RcMenuItem, MenuItemGroup as RcMenuItemGroup, SubMenu as RcSubMenu } from 'rc-menu';
import React, { useContext } from 'react';
import { ConfigContext } from '../config-provider/ConfigProvider';
diff --git a/packages/design/src/components/radio-group/RadioGroup.tsx b/packages/design/src/components/radio-group/RadioGroup.tsx
index f55fbb2215..b57d661ce8 100644
--- a/packages/design/src/components/radio-group/RadioGroup.tsx
+++ b/packages/design/src/components/radio-group/RadioGroup.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import { IRadioProps } from '../radio/Radio';
+import type { IRadioProps } from '../radio/Radio';
import styles from './index.module.less';
export interface IRadioGroupProps {
diff --git a/packages/sheets-plugin-find/src/views/ui/FindModal.tsx b/packages/sheets-plugin-find/src/views/ui/FindModal.tsx
index fd54f23f0f..c4038eafcb 100644
--- a/packages/sheets-plugin-find/src/views/ui/FindModal.tsx
+++ b/packages/sheets-plugin-find/src/views/ui/FindModal.tsx
@@ -1,12 +1,12 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
-import { ICheckboxGroupProps } from '@univerjs/design';
+import type { BaseComponentProps } from '@univerjs/base-ui';
+import type { ICheckboxGroupProps } from '@univerjs/design';
import React, { Component } from 'react';
-type searchResult = {
+interface searchResult {
count: number;
current: number;
replaceCount: number;
-};
+}
// Types for props
export interface IProps extends BaseComponentProps {
diff --git a/packages/sheets-plugin-find/src/views/ui/LocationContent.tsx b/packages/sheets-plugin-find/src/views/ui/LocationContent.tsx
index bf0d981644..726ab85b6e 100644
--- a/packages/sheets-plugin-find/src/views/ui/LocationContent.tsx
+++ b/packages/sheets-plugin-find/src/views/ui/LocationContent.tsx
@@ -1,20 +1,20 @@
import React, { Component } from 'react';
-type LocationProps = {
+interface LocationProps {
config: any;
-};
-type LocationState = {
+}
+interface LocationState {
radioGroup: LabelProps[];
active: string | number;
-};
-type LabelProps = {
+}
+interface LabelProps {
locale: string;
label?: string;
value: string;
disabled?: boolean;
children?: LabelProps[];
checked?: boolean;
-};
+}
export class LocationContent extends Component<LocationProps, LocationState> {
// private _localeObserver: Nullable<Observer<Workbook>>;
@@ -67,7 +67,7 @@ export class LocationContent extends Component<LocationProps, LocationState> {
// const RadioGroup = this.Render.renderFunction('RadioGroup');
// const { radioGroup, active } = this.state;
return (
- <div></div>
+ <div />
// <div className={styles.locationContent}>
// <RadioGroup vertical={true} onChange={this.handleChange} active={active}>
// {radioGroup.map((item) => {
diff --git a/packages/sheets-plugin-find/src/views/ui/SearchContent.tsx b/packages/sheets-plugin-find/src/views/ui/SearchContent.tsx
index a96e9d6782..157bff8b51 100644
--- a/packages/sheets-plugin-find/src/views/ui/SearchContent.tsx
+++ b/packages/sheets-plugin-find/src/views/ui/SearchContent.tsx
@@ -1,4 +1,4 @@
-import { Nullable } from '@univerjs/core';
+import type { Nullable } from '@univerjs/core';
import React, { Component } from 'react';
interface SearchProps {
@@ -7,22 +7,22 @@ interface SearchProps {
keys?: string;
}
-type SearchState = {
+interface SearchState {
tab: LabelProps[];
content: LabelProps[];
match: LabelProps[];
buttons: LabelProps[];
changeSearchText: Nullable<(e: Event) => void>;
getMatch: Nullable<(value: string[]) => void>;
-};
+}
-type LabelProps = {
+interface LabelProps {
locale?: string;
label?: string;
value?: string;
key?: string;
onClick?: () => void;
-};
+}
export class SearchContent extends Component<SearchProps, SearchState> {
// initialize() {
@@ -59,7 +59,7 @@ export class SearchContent extends Component<SearchProps, SearchState> {
// if (!changeSearchText || !getMatch) return;
return (
- <div></div>
+ <div />
// <Tab activeKey={activeKey} type="card">
// {tab.map((item, index) => (
// <TabPane tab={item.label} keys={item.key} key={index}>
diff --git a/packages/sheets-plugin-formula-ui/src/views/more-functions/MoreFunctions.tsx b/packages/sheets-plugin-formula-ui/src/views/more-functions/MoreFunctions.tsx
index b87b21cd14..1151263291 100644
--- a/packages/sheets-plugin-formula-ui/src/views/more-functions/MoreFunctions.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/more-functions/MoreFunctions.tsx
@@ -1,4 +1,4 @@
-import { IFunctionInfo } from '@univerjs/base-formula-engine';
+import type { IFunctionInfo } from '@univerjs/base-formula-engine';
import { ISidebarService } from '@univerjs/base-ui';
import { LocaleService } from '@univerjs/core';
import { Button } from '@univerjs/design';
@@ -33,8 +33,8 @@ export function MoreFunctions() {
return (
<div className={styles.formulaMoreFunctions}>
- {selectFunction && <SelectFunction onChange={setFunctionInfo}></SelectFunction>}
- {inputParams && <InputParams functionInfo={functionInfo} onChange={setParams}></InputParams>}
+ {selectFunction && <SelectFunction onChange={setFunctionInfo} />}
+ {inputParams && <InputParams functionInfo={functionInfo} onChange={setParams} />}
<div className={styles.formulaMoreFunctionsOperation}>
{/* TODO@Dushusir: open input params after range selector refactor */}
{inputParams && (
diff --git a/packages/sheets-plugin-formula-ui/src/views/more-functions/function-help/FunctionHelp.tsx b/packages/sheets-plugin-formula-ui/src/views/more-functions/function-help/FunctionHelp.tsx
index 9e247ad16b..24375bc81a 100644
--- a/packages/sheets-plugin-formula-ui/src/views/more-functions/function-help/FunctionHelp.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/more-functions/function-help/FunctionHelp.tsx
@@ -1,4 +1,4 @@
-import { IFunctionParam } from '@univerjs/base-formula-engine';
+import type { IFunctionParam } from '@univerjs/base-formula-engine';
import React from 'react';
interface IFunctionHelpProps {
diff --git a/packages/sheets-plugin-formula-ui/src/views/more-functions/input-params/InputParams.tsx b/packages/sheets-plugin-formula-ui/src/views/more-functions/input-params/InputParams.tsx
index 4f10293f4b..536a28c208 100644
--- a/packages/sheets-plugin-formula-ui/src/views/more-functions/input-params/InputParams.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/more-functions/input-params/InputParams.tsx
@@ -1,4 +1,4 @@
-import { IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
+import type { IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
import { RangeSelector } from '@univerjs/ui-plugin-sheets';
import React, { useState } from 'react';
diff --git a/packages/sheets-plugin-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx b/packages/sheets-plugin-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
index fe650edebb..75587875f9 100644
--- a/packages/sheets-plugin-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
@@ -1,11 +1,13 @@
-import { FunctionType, IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
+import type { IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
+import { FunctionType } from '@univerjs/base-formula-engine';
import { LocaleService } from '@univerjs/core';
import { Input, Select } from '@univerjs/design';
import { CheckMarkSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
-import { IDescriptionService, ISearchItem } from '../../../services/description.service';
+import type { ISearchItem } from '../../../services/description.service';
+import { IDescriptionService } from '../../../services/description.service';
import { getFunctionTypeValues } from '../../../services/utils';
import { FunctionHelp } from '../function-help/FunctionHelp';
import { FunctionParams } from '../function-params/FunctionParams';
@@ -114,7 +116,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
return (
<div>
<div className={styles.formulaSelectFunctionSelect}>
- <Select value={typeSelected} options={options} onChange={handleSelectChange}></Select>
+ <Select value={typeSelected} options={options} onChange={handleSelectChange} />
<Input
placeholder={localeService.t(`formula.moreFunctions.searchFunctionPlaceholder`)}
@@ -123,7 +125,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
onChange={handleSearchInputChange}
size="large"
allowClear
- ></Input>
+ />
</div>
<ul className={styles.formulaSelectFunctionResult} onKeyDown={handleSelectListKeyDown} tabIndex={-1}>
diff --git a/packages/sheets-plugin-formula-ui/src/views/prompt/error-function/error-function.tsx b/packages/sheets-plugin-formula-ui/src/views/prompt/error-function/error-function.tsx
index f5d4a1c341..b5389998a8 100644
--- a/packages/sheets-plugin-formula-ui/src/views/prompt/error-function/error-function.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/prompt/error-function/error-function.tsx
@@ -2,7 +2,8 @@ import { ICellEditorManagerService } from '@univerjs/ui-plugin-sheets';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
-import { IFormulaPromptService, IHelpFunctionOperationParams } from '../../../services/prompt.service';
+import type { IHelpFunctionOperationParams } from '../../../services/prompt.service';
+import { IFormulaPromptService } from '../../../services/prompt.service';
import styles from './index.module.less';
export function ErrorFunction() {
diff --git a/packages/sheets-plugin-formula-ui/src/views/prompt/help-function/HelpFunction.tsx b/packages/sheets-plugin-formula-ui/src/views/prompt/help-function/HelpFunction.tsx
index cfaa7a5d15..0f3b616418 100644
--- a/packages/sheets-plugin-formula-ui/src/views/prompt/help-function/HelpFunction.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/prompt/help-function/HelpFunction.tsx
@@ -1,4 +1,4 @@
-import { IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
+import type { IFunctionInfo, IFunctionParam } from '@univerjs/base-formula-engine';
import { LocaleService } from '@univerjs/core';
import { Dropdown } from '@univerjs/design';
import { CloseSingle, DetailsSingle, MoreSingle } from '@univerjs/icons';
@@ -6,7 +6,8 @@ import { ICellEditorManagerService } from '@univerjs/ui-plugin-sheets';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
-import { IFormulaPromptService, IHelpFunctionOperationParams } from '../../../services/prompt.service';
+import type { IHelpFunctionOperationParams } from '../../../services/prompt.service';
+import { IFormulaPromptService } from '../../../services/prompt.service';
import styles from './index.module.less';
export function HelpFunction() {
@@ -130,7 +131,7 @@ export function HelpFunction() {
)
}
>
- <span></span>
+ <span />
</Dropdown>
) : visible ? (
<div
diff --git a/packages/sheets-plugin-formula-ui/src/views/prompt/search-function/SearchFunction.tsx b/packages/sheets-plugin-formula-ui/src/views/prompt/search-function/SearchFunction.tsx
index c36d4fe072..8a5b091495 100644
--- a/packages/sheets-plugin-formula-ui/src/views/prompt/search-function/SearchFunction.tsx
+++ b/packages/sheets-plugin-formula-ui/src/views/prompt/search-function/SearchFunction.tsx
@@ -4,12 +4,9 @@ import { ICellEditorManagerService } from '@univerjs/ui-plugin-sheets';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
-import { ISearchItem } from '../../../services/description.service';
-import {
- IFormulaPromptService,
- INavigateParam,
- ISearchFunctionOperationParams,
-} from '../../../services/prompt.service';
+import type { ISearchItem } from '../../../services/description.service';
+import type { INavigateParam, ISearchFunctionOperationParams } from '../../../services/prompt.service';
+import { IFormulaPromptService } from '../../../services/prompt.service';
import styles from './index.module.less';
export function SearchFunction() {
@@ -108,7 +105,7 @@ export function SearchFunction() {
</ul>
}
>
- <span></span>
+ <span />
</Dropdown>
);
}
diff --git a/packages/sheets-plugin-numfmt/src/components/accounting/index.tsx b/packages/sheets-plugin-numfmt/src/components/accounting/index.tsx
index 41edc5f612..f721335026 100644
--- a/packages/sheets-plugin-numfmt/src/components/accounting/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/accounting/index.tsx
@@ -1,9 +1,10 @@
import { LocaleService } from '@univerjs/core';
import { InputNumber, Select } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
-import React, { FC, useEffect, useMemo, useState } from 'react';
+import type { FC } from 'react';
+import React, { useEffect, useMemo, useState } from 'react';
-import { BusinessComponentProps } from '../../base/types';
+import type { BusinessComponentProps } from '../../base/types';
import { getCurrencyType } from '../../utils/currency';
import { getDecimalFromPattern, setPatternDecimal } from '../../utils/decimal';
import { getCurrencyOptions } from '../../utils/options';
@@ -45,7 +46,7 @@ export const AccountingPanel: FC<BusinessComponentProps> = (props) => {
<div className="label">{t('sheet.numfmt.currencyType')}</div>
<div className="m-t-8 w-140">
- <Select onChange={suffixSet} options={currencyOptions} value={suffix}></Select>
+ <Select onChange={suffixSet} options={currencyOptions} value={suffix} />
</div>
</div>
</div>
diff --git a/packages/sheets-plugin-numfmt/src/components/currency/index.tsx b/packages/sheets-plugin-numfmt/src/components/currency/index.tsx
index fc0e50dbda..050f71a241 100644
--- a/packages/sheets-plugin-numfmt/src/components/currency/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/currency/index.tsx
@@ -3,9 +3,10 @@ import './index.less';
import { LocaleService } from '@univerjs/core';
import { InputNumber, Select, SelectList } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
-import React, { FC, useEffect, useMemo, useRef, useState } from 'react';
+import type { FC } from 'react';
+import React, { useEffect, useMemo, useRef, useState } from 'react';
-import { BusinessComponentProps } from '../../base/types';
+import type { BusinessComponentProps } from '../../base/types';
import { getCurrencyType } from '../../utils/currency';
import { getDecimalFromPattern, isPatternEqualWithoutDecimal, setPatternDecimal } from '../../utils/decimal';
import { getCurrencyFormatOptions, getCurrencyOptions } from '../../utils/options';
@@ -78,14 +79,14 @@ export const CurrencyPanel: FC<BusinessComponentProps> = (props) => {
}}
options={currencyOptions}
value={suffix}
- ></Select>
+ />
</div>
</div>
</div>
<div className="m-t-16 label"> {t('sheet.numfmt.negType')}</div>
<div className="m-t-8">
- <SelectList onChange={patternSet} options={negativeOptions} value={pattern}></SelectList>
+ <SelectList onChange={patternSet} options={negativeOptions} value={pattern} />
</div>
<div className="describe m-t-14">{t('sheet.numfmt.currencyDes')}</div>
diff --git a/packages/sheets-plugin-numfmt/src/components/date/index.tsx b/packages/sheets-plugin-numfmt/src/components/date/index.tsx
index d89c2212e6..998a9ca6bd 100644
--- a/packages/sheets-plugin-numfmt/src/components/date/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/date/index.tsx
@@ -2,9 +2,10 @@ import numfmt from '@univerjs/base-numfmt-engine';
import { LocaleService } from '@univerjs/core';
import { SelectList } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
-import React, { FC, useEffect, useMemo, useState } from 'react';
+import type { FC } from 'react';
+import React, { useEffect, useMemo, useState } from 'react';
-import { BusinessComponentProps } from '../../base/types';
+import type { BusinessComponentProps } from '../../base/types';
import { getDateFormatOptions } from '../../utils/options';
export const isDatePanel = (pattern: string) => {
@@ -37,7 +38,7 @@ export const DatePanel: FC<BusinessComponentProps> = (props) => {
<div>
<div className="m-t-16 label">{t('sheet.numfmt.dateType')}</div>
<div className="m-t-8">
- <SelectList value={suffix} options={options} onChange={suffixSet}></SelectList>
+ <SelectList value={suffix} options={options} onChange={suffixSet} />
</div>
<div className="describe m-t-14">{t('sheet.numfmt.dateDes')}</div>
</div>
diff --git a/packages/sheets-plugin-numfmt/src/components/general/index.tsx b/packages/sheets-plugin-numfmt/src/components/general/index.tsx
index 65fac2d857..04d8aeffa9 100644
--- a/packages/sheets-plugin-numfmt/src/components/general/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/general/index.tsx
@@ -1,8 +1,9 @@
import { LocaleService } from '@univerjs/core';
import { useDependency } from '@wendellhu/redi/react-bindings';
-import React, { FC, useEffect } from 'react';
+import type { FC } from 'react';
+import React, { useEffect } from 'react';
-import { BusinessComponentProps } from '../../base/types';
+import type { BusinessComponentProps } from '../../base/types';
export const isGeneralPanel = (pattern: string) => !pattern;
diff --git a/packages/sheets-plugin-numfmt/src/components/index.tsx b/packages/sheets-plugin-numfmt/src/components/index.tsx
index 119ba30b0d..2261f10a62 100644
--- a/packages/sheets-plugin-numfmt/src/components/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/index.tsx
@@ -1,21 +1,23 @@
import './index.less';
import { LocaleService } from '@univerjs/core';
-import { Button, ISelectProps, Select } from '@univerjs/design';
+import type { ISelectProps } from '@univerjs/design';
+import { Button, Select } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
-import React, { FC, useEffect, useMemo, useRef, useState } from 'react';
+import type { FC } from 'react';
+import React, { useEffect, useMemo, useRef, useState } from 'react';
-import { BusinessComponentProps } from '../base/types';
+import type { BusinessComponentProps } from '../base/types';
import { AccountingPanel, isAccountingPanel } from './accounting';
import { CurrencyPanel, isCurrencyPanel } from './currency';
import { DatePanel, isDatePanel } from './date';
import { GeneralPanel, isGeneralPanel } from './general';
import { isThousandthPercentilePanel, ThousandthPercentilePanel } from './thousandth-percentile';
-export type SheetNumfmtPanelProps = {
+export interface SheetNumfmtPanelProps {
value: { defaultValue: number; defaultPattern: string };
onChange: (config: { type: 'change' | 'cancel' | 'confirm'; value: string }) => void;
-};
+}
export const SheetNumfmtPanel: FC<SheetNumfmtPanelProps> = (props) => {
const { defaultValue, defaultPattern } = props.value;
const localeService = useDependency(LocaleService);
@@ -75,7 +77,7 @@ export const SheetNumfmtPanel: FC<SheetNumfmtPanelProps> = (props) => {
<div>
<div className="label m-t-14">{t('sheet.numfmt.numfmtType')}</div>
<div className="m-t-8">
- <Select onChange={handleSelect} options={selectOptions} value={type}></Select>
+ <Select onChange={handleSelect} options={selectOptions} value={type} />
</div>
<div>{BusinessComponent && <BusinessComponent {...subProps} />}</div>
</div>
diff --git a/packages/sheets-plugin-numfmt/src/components/stories/panel.stories.tsx b/packages/sheets-plugin-numfmt/src/components/stories/panel.stories.tsx
index 90613aba46..6b8409d6ad 100644
--- a/packages/sheets-plugin-numfmt/src/components/stories/panel.stories.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/stories/panel.stories.tsx
@@ -5,7 +5,8 @@ import { connectInjector } from '@wendellhu/redi/react-bindings';
import React, { useMemo } from 'react';
import { zhCn } from '../../locale/zh-CN';
-import { SheetNumfmtPanel, SheetNumfmtPanelProps } from '../index';
+import type { SheetNumfmtPanelProps } from '../index';
+import { SheetNumfmtPanel } from '../index';
const Index = (props: any) => {
const inject = useMemo(() => new Injector([[LocaleService], [ThemeService]]), []);
diff --git a/packages/sheets-plugin-numfmt/src/components/thousandth-percentile/index.tsx b/packages/sheets-plugin-numfmt/src/components/thousandth-percentile/index.tsx
index ee0bbf00cc..acb71bbc96 100644
--- a/packages/sheets-plugin-numfmt/src/components/thousandth-percentile/index.tsx
+++ b/packages/sheets-plugin-numfmt/src/components/thousandth-percentile/index.tsx
@@ -1,7 +1,8 @@
import { InputNumber, SelectList } from '@univerjs/design';
-import React, { FC, useEffect, useMemo, useState } from 'react';
+import type { FC } from 'react';
+import React, { useEffect, useMemo, useState } from 'react';
-import { BusinessComponentProps } from '../../base/types';
+import type { BusinessComponentProps } from '../../base/types';
import {
getDecimalFromPattern,
isPatternEqualWithoutDecimal,
@@ -49,7 +50,7 @@ export const ThousandthPercentilePanel: FC<BusinessComponentProps> = (props) =>
</div>
<div className="m-t-16 label"> 负数类型</div>
<div className="m-t-8">
- <SelectList onChange={handleClick} options={options} value={suffix}></SelectList>
+ <SelectList onChange={handleClick} options={options} value={suffix} />
</div>
<div className="describe m-t-14">货币格式用于表示一般货币数值。会计格式可以对一列数值进行小数点对齐。</div>
</div>
diff --git a/packages/ui-plugin-docs/src/views/doc-container/DocContainer.tsx b/packages/ui-plugin-docs/src/views/doc-container/DocContainer.tsx
index c02411b6ae..3197880aab 100644
--- a/packages/ui-plugin-docs/src/views/doc-container/DocContainer.tsx
+++ b/packages/ui-plugin-docs/src/views/doc-container/DocContainer.tsx
@@ -1,7 +1,7 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
+import type { BaseComponentProps } from '@univerjs/base-ui';
import React, { Component, createRef } from 'react';
-import { IDocUIPluginConfig } from '../../basics';
+import type { IDocUIPluginConfig } from '../../basics';
import style from './index.module.less';
export interface BaseDocContainerProps extends BaseComponentProps {
@@ -153,7 +153,7 @@ export class DocContainer extends Component<BaseDocContainerProps> {
return (
<section className={style.layoutContainer}>
<div>
- <aside style={{ display: config.outerLeft ? 'block' : 'none' }}></aside>
+ <aside style={{ display: config.outerLeft ? 'block' : 'none' }} />
<div className={style.mainContent} style={{ position: 'relative' }}>
<div>
<aside
@@ -172,17 +172,14 @@ export class DocContainer extends Component<BaseDocContainerProps> {
>
{!!config.contentSplit && (
<div ref={this.splitLeftRef} className={style.contentInnerLeftContainer}>
- <div
- className={style.hoverCursor}
- onMouseDown={this.handleSplitBarMouseDown}
- ></div>
+ <div className={style.hoverCursor} onMouseDown={this.handleSplitBarMouseDown} />
</div>
)}
<div
onContextMenu={(e) => e.preventDefault()}
ref={this.contentRef}
className={style.contentInnerRightContainer}
- ></div>
+ />
{/* extend main content */}
</div>
@@ -199,14 +196,14 @@ export class DocContainer extends Component<BaseDocContainerProps> {
style={{
display: config.footer ? 'block' : 'none',
}}
- ></footer>
+ />
</div>
<aside
style={{
display: config.outerRight ? 'block' : 'none',
}}
className={style.outerRightContainer}
- ></aside>
+ />
</div>
</section>
);
diff --git a/packages/ui-plugin-sheets/src/components/border-panel/BorderPanel.tsx b/packages/ui-plugin-sheets/src/components/border-panel/BorderPanel.tsx
index bfbcbdd41b..faba3b0090 100644
--- a/packages/ui-plugin-sheets/src/components/border-panel/BorderPanel.tsx
+++ b/packages/ui-plugin-sheets/src/components/border-panel/BorderPanel.tsx
@@ -1,4 +1,4 @@
-import { IBorderInfo } from '@univerjs/base-sheets';
+import type { IBorderInfo } from '@univerjs/base-sheets';
import { ComponentManager } from '@univerjs/base-ui';
import { BorderStyleTypes } from '@univerjs/core';
import { ColorPicker, Dropdown, Menu, MenuItem } from '@univerjs/design';
diff --git a/packages/ui-plugin-sheets/src/components/font-family/FontFamily.tsx b/packages/ui-plugin-sheets/src/components/font-family/FontFamily.tsx
index 38ddd4f7ef..52268306c4 100644
--- a/packages/ui-plugin-sheets/src/components/font-family/FontFamily.tsx
+++ b/packages/ui-plugin-sheets/src/components/font-family/FontFamily.tsx
@@ -3,7 +3,7 @@ import { useDependency } from '@wendellhu/redi/react-bindings';
import React from 'react';
import styles from './index.module.less';
-import { IFontFamilyProps } from './interface';
+import type { IFontFamilyProps } from './interface';
export const FontFamily = (props: IFontFamilyProps) => {
const { value } = props;
diff --git a/packages/ui-plugin-sheets/src/components/font-family/FontFamilyItem.tsx b/packages/ui-plugin-sheets/src/components/font-family/FontFamilyItem.tsx
index 2b3a9164e4..8094100140 100644
--- a/packages/ui-plugin-sheets/src/components/font-family/FontFamilyItem.tsx
+++ b/packages/ui-plugin-sheets/src/components/font-family/FontFamilyItem.tsx
@@ -3,7 +3,7 @@ import { useDependency } from '@wendellhu/redi/react-bindings';
import React from 'react';
import styles from './index.module.less';
-import { IFontFamilyItemProps } from './interface';
+import type { IFontFamilyItemProps } from './interface';
export const FontFamilyItem = (props: IFontFamilyItemProps) => {
const { value } = props;
diff --git a/packages/ui-plugin-sheets/src/components/font-size/FontSize.tsx b/packages/ui-plugin-sheets/src/components/font-size/FontSize.tsx
index 92b4053406..6fad718e3c 100644
--- a/packages/ui-plugin-sheets/src/components/font-size/FontSize.tsx
+++ b/packages/ui-plugin-sheets/src/components/font-size/FontSize.tsx
@@ -2,7 +2,7 @@ import { InputNumber } from '@univerjs/design';
import React, { useMemo, useState } from 'react';
import styles from './index.module.less';
-import { IFontSizeProps } from './interface';
+import type { IFontSizeProps } from './interface';
export const FontSize = (props: IFontSizeProps) => {
const { value, min, max, onChange } = props;
diff --git a/packages/ui-plugin-sheets/src/components/menu-item-input/MenuItemInput.tsx b/packages/ui-plugin-sheets/src/components/menu-item-input/MenuItemInput.tsx
index 5ba12285e1..4c75bf9d6b 100644
--- a/packages/ui-plugin-sheets/src/components/menu-item-input/MenuItemInput.tsx
+++ b/packages/ui-plugin-sheets/src/components/menu-item-input/MenuItemInput.tsx
@@ -4,7 +4,7 @@ import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
import styles from './index.module.less';
-import { IMenuItemInputProps } from './interface';
+import type { IMenuItemInputProps } from './interface';
export const MenuItemInput = (props: IMenuItemInputProps) => {
const { prefix, suffix, value, onChange } = props;
diff --git a/packages/ui-plugin-sheets/src/components/range-selector/RangeSelector.tsx b/packages/ui-plugin-sheets/src/components/range-selector/RangeSelector.tsx
index f166746d5f..ad5a77fb02 100644
--- a/packages/ui-plugin-sheets/src/components/range-selector/RangeSelector.tsx
+++ b/packages/ui-plugin-sheets/src/components/range-selector/RangeSelector.tsx
@@ -90,7 +90,7 @@ export function RangeSelector(props: IRangeSelectorProps) {
data-placeholder={localeService.t('rangeSelector.placeholder')}
onKeyDown={handleKeyDown}
onFocus={handleFocus}
- ></div>
+ />
<Tooltip title={localeService.t('rangeSelector.tooltip')} placement="bottom">
<button className={styles.rangeSelectorIcon} onClick={handleClick}>
diff --git a/packages/ui-plugin-sheets/src/views/formula-bar/FormulaBar.tsx b/packages/ui-plugin-sheets/src/views/formula-bar/FormulaBar.tsx
index 706b06bb0c..f8201ac6da 100644
--- a/packages/ui-plugin-sheets/src/views/formula-bar/FormulaBar.tsx
+++ b/packages/ui-plugin-sheets/src/views/formula-bar/FormulaBar.tsx
@@ -1,22 +1,22 @@
import { ComponentManager } from '@univerjs/base-ui';
-import { Nullable } from '@univerjs/core';
+import type { Nullable } from '@univerjs/core';
import { CheckMarkSingle, CloseSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useState } from 'react';
import styles from './index.module.less';
-type FormulaState = {
+interface FormulaState {
namedRanges: any[];
spanClass: string;
formulaContent: string;
fx: Nullable<Fx>;
-};
+}
-export type Fx = {
+export interface Fx {
icon: string;
onClick: () => void;
-};
+}
export function FormulaBar() {
const [state, setState] = useState<FormulaState>({
diff --git a/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx b/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
index 3155545953..8ce7fef318 100644
--- a/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
+++ b/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
@@ -1,17 +1,15 @@
import { IRenderManagerService } from '@univerjs/base-render';
import { SetRangeValuesMutation } from '@univerjs/base-sheets';
-import { ICommandInfo, ICommandService, IUniverInstanceService, LocaleService, toDisposable } from '@univerjs/core';
+import type { ICommandInfo } from '@univerjs/core';
+import { ICommandService, IUniverInstanceService, LocaleService, toDisposable } from '@univerjs/core';
import { Dropdown } from '@univerjs/design';
import { Autofill, CheckMarkSingle, MoreDownSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
import clsx from 'clsx';
import React, { useCallback, useEffect, useState } from 'react';
-import {
- AutoClearContentCommand,
- AutoFillCommand,
- IAutoFillCommandParams,
-} from '../../commands/commands/auto-fill.command';
+import type { IAutoFillCommandParams } from '../../commands/commands/auto-fill.command';
+import { AutoClearContentCommand, AutoFillCommand } from '../../commands/commands/auto-fill.command';
import { RefillCommand } from '../../commands/commands/refill.command';
import { SetCellEditVisibleOperation } from '../../commands/operations/cell-edit.operation';
import { SetScrollOperation } from '../../commands/operations/scroll.operation';
@@ -178,12 +176,8 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
<Autofill
style={{ color: '#35322B' }}
extend={{ colorChannel1: 'rgb(var(--green-700, #409f11))' }}
- ></Autofill>
- {showMore && (
- <MoreDownSingle
- style={{ color: '#CCCCCC', fontSize: '8px', marginLeft: '8px' }}
- ></MoreDownSingle>
- )}
+ />
+ {showMore && <MoreDownSingle style={{ color: '#CCCCCC', fontSize: '8px', marginLeft: '8px' }} />}
</div>
</Dropdown>
</div>
diff --git a/packages/ui-plugin-sheets/src/views/operate-container/OperateContainer.tsx b/packages/ui-plugin-sheets/src/views/operate-container/OperateContainer.tsx
index 21ad78457a..ab53735184 100644
--- a/packages/ui-plugin-sheets/src/views/operate-container/OperateContainer.tsx
+++ b/packages/ui-plugin-sheets/src/views/operate-container/OperateContainer.tsx
@@ -5,6 +5,6 @@ import styles from './index.module.less';
export const OperateContainer: React.FC = () => (
<div className={styles.operateContainer}>
- <AutoFillPopupMenu></AutoFillPopupMenu>
+ <AutoFillPopupMenu />
</div>
);
diff --git a/packages/ui-plugin-sheets/src/views/sheet-bar/SheetBar.tsx b/packages/ui-plugin-sheets/src/views/sheet-bar/SheetBar.tsx
index c750b8c2e8..cb18f72ba9 100644
--- a/packages/ui-plugin-sheets/src/views/sheet-bar/SheetBar.tsx
+++ b/packages/ui-plugin-sheets/src/views/sheet-bar/SheetBar.tsx
@@ -9,7 +9,7 @@ import styles from './index.module.less';
import { SheetBarButton } from './sheet-bar-button/SheetBarButton';
import { SheetBarMenu } from './sheet-bar-menu/SheetBarMenu';
import { SheetBarTabs } from './sheet-bar-tabs/SheetBarTabs';
-import { IScrollState } from './sheet-bar-tabs/utils/slide-tab-bar';
+import type { IScrollState } from './sheet-bar-tabs/utils/slide-tab-bar';
const SCROLL_WIDTH = 100;
diff --git a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
index 22cf9e96a7..a1533db36b 100644
--- a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
+++ b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx
@@ -8,13 +8,8 @@ import {
SetWorksheetOrderMutation,
SetWorksheetShowCommand,
} from '@univerjs/base-sheets';
-import {
- BooleanNumber,
- DisposableCollection,
- ICommandInfo,
- ICommandService,
- IUniverInstanceService,
-} from '@univerjs/core';
+import type { ICommandInfo } from '@univerjs/core';
+import { BooleanNumber, DisposableCollection, ICommandService, IUniverInstanceService } from '@univerjs/core';
import { Dropdown } from '@univerjs/design';
import { CheckMarkSingle, ConvertSingle, EyelashSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
diff --git a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
index f3679013ed..41195a5db6 100644
--- a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
+++ b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
@@ -1,6 +1,7 @@
import { TinyColor } from '@ctrl/tinycolor';
import { Menu } from '@univerjs/base-ui';
-import { BooleanNumber, ICommandService, ThemeService } from '@univerjs/core';
+import type { BooleanNumber } from '@univerjs/core';
+import { ICommandService, ThemeService } from '@univerjs/core';
import { Dropdown } from '@univerjs/design';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useState } from 'react';
diff --git a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx
index b9b9c45b3f..4a29b9552d 100644
--- a/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx
+++ b/packages/ui-plugin-sheets/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx
@@ -11,14 +11,17 @@ import {
SetWorksheetOrderMutation,
} from '@univerjs/base-sheets';
import { IConfirmService } from '@univerjs/base-ui';
-import { BooleanNumber, ICommandInfo, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
+import type { ICommandInfo } from '@univerjs/core';
+import { BooleanNumber, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
import { useDependency } from '@wendellhu/redi/react-bindings';
import React, { useEffect, useRef, useState } from 'react';
import { ISheetBarService } from '../../../services/sheet-bar/sheet-bar.service';
import styles from './index.module.less';
-import { IBaseSheetBarProps, SheetBarItem } from './SheetBarItem';
-import { IScrollState, SlideTabBar } from './utils/slide-tab-bar';
+import type { IBaseSheetBarProps } from './SheetBarItem';
+import { SheetBarItem } from './SheetBarItem';
+import type { IScrollState } from './utils/slide-tab-bar';
+import { SlideTabBar } from './utils/slide-tab-bar';
export interface ISheetBarTabsProps {}
diff --git a/packages/ui-plugin-sheets/src/views/sheet-container/SheetContainer.tsx b/packages/ui-plugin-sheets/src/views/sheet-container/SheetContainer.tsx
index badfa76634..edbda73ab3 100644
--- a/packages/ui-plugin-sheets/src/views/sheet-container/SheetContainer.tsx
+++ b/packages/ui-plugin-sheets/src/views/sheet-container/SheetContainer.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import { ISheetUIPluginConfig } from '../../basics';
+import type { ISheetUIPluginConfig } from '../../basics';
import { CountBar } from '../count-bar/CountBar';
import { EditorContainer } from '../editor-container/EditorContainer';
import { FormulaBar } from '../formula-bar/FormulaBar';
diff --git a/packages/ui-plugin-sheets/src/views/status-bar/CopyableStatisticItem.tsx b/packages/ui-plugin-sheets/src/views/status-bar/CopyableStatisticItem.tsx
index 80c0b002c1..cec2122624 100644
--- a/packages/ui-plugin-sheets/src/views/status-bar/CopyableStatisticItem.tsx
+++ b/packages/ui-plugin-sheets/src/views/status-bar/CopyableStatisticItem.tsx
@@ -21,9 +21,9 @@ export const functionDisplayNames: FunctionNameMap = {
[FUNCTION_NAMES.COUNT]: 'statusbar.count',
[FUNCTION_NAMES.CONCATENATE]: 'concatenate',
};
-type FunctionNameMap = {
+interface FunctionNameMap {
[key: string]: string;
-};
+}
export const CopyableStatisticItem: React.FC<IStatisticItem> = (item: IStatisticItem) => {
const localeService = useDependency(LocaleService);
diff --git a/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx b/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
index c40e32245e..7ca9c27b81 100644
--- a/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
+++ b/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
@@ -6,7 +6,8 @@ import clsx from 'clsx';
import React, { useEffect, useState } from 'react';
import { IStatusBarService } from '../../services/status-bar.service';
-import { CopyableStatisticItem, formatNumber, functionDisplayNames, IStatisticItem } from './CopyableStatisticItem';
+import type { IStatisticItem } from './CopyableStatisticItem';
+import { CopyableStatisticItem, formatNumber, functionDisplayNames } from './CopyableStatisticItem';
import styles from './index.module.less';
const SINGLE_MODE_WIDTH = 800;
@@ -123,7 +124,7 @@ export const StatusBar = () => {
value={item.name}
checked={item.show}
onChange={() => onChange && onChange(item)}
- ></Checkbox>
+ />
<span>{`${localeService.t(
functionDisplayNames?.[item.name] || item.name
)}: ${formatNumber(item.value)}`}</span>
@@ -136,7 +137,7 @@ export const StatusBar = () => {
<MoreSingle />
</div>
</Dropdown>
- <div className={styles.statusBarDiv}></div>
+ <div className={styles.statusBarDiv} />
</div>
)
);
diff --git a/packages/ui-plugin-slides/src/views/info-bar/InfoBar.tsx b/packages/ui-plugin-slides/src/views/info-bar/InfoBar.tsx
index 237d3d1dd7..0893495213 100644
--- a/packages/ui-plugin-slides/src/views/info-bar/InfoBar.tsx
+++ b/packages/ui-plugin-slides/src/views/info-bar/InfoBar.tsx
@@ -1,9 +1,9 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
-import { Nullable } from '@univerjs/core';
+import type { BaseComponentProps } from '@univerjs/base-ui';
+import type { Nullable } from '@univerjs/core';
import { Container, Input, Tooltip } from '@univerjs/design';
import React, { Component } from 'react';
-import { BaseInfoBarProps } from '../../controllers/info-bar-ui-controller';
+import type { BaseInfoBarProps } from '../../controllers/info-bar-ui-controller';
import styles from './index.module.less';
interface IState {
diff --git a/packages/ui-plugin-slides/src/views/slide-bar/SlideBar.tsx b/packages/ui-plugin-slides/src/views/slide-bar/SlideBar.tsx
index 0004d3f5ea..00eddf567c 100644
--- a/packages/ui-plugin-slides/src/views/slide-bar/SlideBar.tsx
+++ b/packages/ui-plugin-slides/src/views/slide-bar/SlideBar.tsx
@@ -1,5 +1,5 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
-import { ISlidePage } from '@univerjs/core';
+import type { BaseComponentProps } from '@univerjs/base-ui';
+import type { ISlidePage } from '@univerjs/core';
import React, { Component, createRef } from 'react';
import styles from './index.module.less';
@@ -95,7 +95,7 @@ export class SlideBar extends Component<{}, SlideBarState> {
onClick={() => this.activeSlide(item.id, index)}
>
<span>{index + 1}</span>
- <div className={styles.slideBarBox}></div>
+ <div className={styles.slideBarBox} />
</div>
))}
</div>
diff --git a/packages/ui-plugin-slides/src/views/slide-container/SlideContainer.tsx b/packages/ui-plugin-slides/src/views/slide-container/SlideContainer.tsx
index bd1d6a080b..9079734e2e 100644
--- a/packages/ui-plugin-slides/src/views/slide-container/SlideContainer.tsx
+++ b/packages/ui-plugin-slides/src/views/slide-container/SlideContainer.tsx
@@ -1,7 +1,7 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
+import type { BaseComponentProps } from '@univerjs/base-ui';
import React, { Component, createRef } from 'react';
-import { ISlideUIPluginConfig } from '../../basics';
+import type { ISlideUIPluginConfig } from '../../basics';
import { InfoBar } from '../info-bar';
import { SlideBar } from '../slide-bar/SlideBar';
import { Toolbar } from '../toolbar';
@@ -156,11 +156,11 @@ export class SlideContainer extends Component<BaseSlideContainerProps> {
return (
<section className={style.layoutContainer}>
<div>
- <aside style={{ display: config.outerLeft ? 'block' : 'none' }}></aside>
+ <aside style={{ display: config.outerLeft ? 'block' : 'none' }} />
<div className={style.mainContent} style={{ position: 'relative' }}>
<header style={{ display: config.header ? 'block' : 'none' }}>
- {config.infoBar && <InfoBar {...methods.infoBar}></InfoBar>}
- {config.toolbar && <Toolbar {...methods.toolbar}></Toolbar>}
+ {config.infoBar && <InfoBar {...methods.infoBar} />}
+ {config.toolbar && <Toolbar {...methods.toolbar} />}
</header>
<div>
<aside
@@ -169,7 +169,7 @@ export class SlideContainer extends Component<BaseSlideContainerProps> {
display: config.innerLeft ? 'block' : 'none',
}}
>
- <SlideBar {...methods.slideBar}></SlideBar>
+ <SlideBar {...methods.slideBar} />
</aside>
<div
className={
@@ -180,10 +180,7 @@ export class SlideContainer extends Component<BaseSlideContainerProps> {
>
{!!config.contentSplit && (
<div ref={this.splitLeftRef} className={style.contentInnerLeftContainer}>
- <div
- className={style.hoverCursor}
- onMouseDown={this.handleSplitBarMouseDown}
- ></div>
+ <div className={style.hoverCursor} onMouseDown={this.handleSplitBarMouseDown} />
</div>
)}
<div
@@ -218,7 +215,7 @@ export class SlideContainer extends Component<BaseSlideContainerProps> {
display: config.outerRight ? 'block' : 'none',
}}
className={style.outerRightContainer}
- ></aside>
+ />
</div>
</section>
);
diff --git a/packages/ui-plugin-slides/src/views/toolbar/DataBar.tsx b/packages/ui-plugin-slides/src/views/toolbar/DataBar.tsx
index dedb4126de..f4c8a5ef03 100644
--- a/packages/ui-plugin-slides/src/views/toolbar/DataBar.tsx
+++ b/packages/ui-plugin-slides/src/views/toolbar/DataBar.tsx
@@ -1,10 +1,10 @@
import React from 'react';
-type BarProps = {
+interface BarProps {
list: Array<Record<string, string>>;
img: string;
onClick?: (item: {}, index: number) => void;
-};
+}
export const DataBar = (props: BarProps) => {
const { list, img, onClick } = props;
@@ -21,7 +21,7 @@ export const DataBar = (props: BarProps) => {
key={index}
onClick={() => handleClick(item, index)}
style={{ width: '28px', height: '26px', background, backgroundPosition: `${item.x} ${item.y}` }}
- ></div>
+ />
))}
</div>
);
diff --git a/packages/ui-plugin-slides/src/views/toolbar/Toolbar.tsx b/packages/ui-plugin-slides/src/views/toolbar/Toolbar.tsx
index 035f8f18a3..3a250ca28a 100644
--- a/packages/ui-plugin-slides/src/views/toolbar/Toolbar.tsx
+++ b/packages/ui-plugin-slides/src/views/toolbar/Toolbar.tsx
@@ -1,10 +1,10 @@
-import { BaseComponentProps } from '@univerjs/base-ui';
+import type { BaseComponentProps } from '@univerjs/base-ui';
import { Button, Container, Tooltip } from '@univerjs/design';
import React, { Component, createRef } from 'react';
-import { SlideUIPlugin } from '../..';
+import type { SlideUIPlugin } from '../..';
import { SLIDE_UI_PLUGIN_NAME } from '../../basics';
-import { IToolbarItemProps } from '../../controllers';
+import type { IToolbarItemProps } from '../../controllers';
import styles from './index.module.less';
interface IProps extends BaseComponentProps {
diff --git a/packages/uniscript/src/views/components/ScriptEditorPanel.tsx b/packages/uniscript/src/views/components/ScriptEditorPanel.tsx
index f41b08f0eb..cadc703fa5 100644
--- a/packages/uniscript/src/views/components/ScriptEditorPanel.tsx
+++ b/packages/uniscript/src/views/components/ScriptEditorPanel.tsx
@@ -1,7 +1,8 @@
import { IMessageService, IShortcutService } from '@univerjs/base-ui';
-import { DisposableCollection, LocaleService, Nullable, toDisposable } from '@univerjs/core';
+import type { Nullable } from '@univerjs/core';
+import { DisposableCollection, LocaleService, toDisposable } from '@univerjs/core';
import { Button, MessageType } from '@univerjs/design';
-import { IDisposable } from '@wendellhu/redi';
+import type { IDisposable } from '@wendellhu/redi';
import { useDependency } from '@wendellhu/redi/react-bindings';
import { editor } from 'monaco-editor';
import React, { useCallback, useEffect, useRef } from 'react';
@@ -96,7 +97,7 @@ export function ScriptEditorPanel() {
return (
<div className={styles.scriptEditorPanel}>
<div className={styles.scriptEditorContent} ref={editorContentRef}>
- <div className={styles.scriptEditorContainer} ref={editorContainerRef}></div>
+ <div className={styles.scriptEditorContainer} ref={editorContainerRef} />
</div>
<div className={styles.scriptEditorActions}>
<Button type="primary" size="small" onClick={startExecution}>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bf9ab8566e..1121b68678 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -92,6 +92,9 @@ importers:
eslint-plugin-prettier:
specifier: ^5.0.1
+ 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])
@@ -6638,6 +6641,16 @@ packages:
es-shim-unscopables: 1.0.2
dev: true
+ resolution: {integrity: sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==}
+ 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-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==}
engines: {node: '>= 0.4'}
@@ -6697,6 +6710,12 @@ packages:
resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==}
dev: true
+ resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==}
+ dependencies:
+ has-symbols: 1.0.3
+ dev: true
+
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
dev: true
@@ -7882,6 +7901,25 @@ packages:
stop-iteration-iterator: 1.0.0
dev: true
+ resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==}
+ dependencies:
+ asynciterator.prototype: 1.0.0
+ call-bind: 1.0.5
+ define-properties: 1.2.1
+ es-abstract: 1.22.3
+ es-set-tostringtag: 2.0.2
+ function-bind: 1.1.2
+ get-intrinsic: 1.2.2
+ globalthis: 1.0.3
+ has-property-descriptors: 1.0.1
+ has-proto: 1.0.1
+ has-symbols: 1.0.3
+ internal-slot: 1.0.6
+ iterator.prototype: 1.1.2
+ safe-array-concat: 1.0.1
+ dev: true
+
resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==}
dev: true
@@ -8252,6 +8290,31 @@ packages:
synckit: 0.8.5
dev: true
+ resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==}
+ engines: {node: '>=4'}
+ peerDependencies:
+ eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
+ dependencies:
+ array-includes: 3.1.7
+ array.prototype.flatmap: 1.3.2
+ array.prototype.tosorted: 1.1.2
+ doctrine: 2.1.0
+ es-iterator-helpers: 1.0.15
+ eslint: 8.54.0
+ estraverse: 5.3.0
+ jsx-ast-utils: 3.3.5
+ minimatch: 3.1.2
+ object.entries: 1.1.7
+ object.fromentries: 2.0.7
+ object.hasown: 1.1.3
+ object.values: 1.1.7
+ prop-types: 15.8.1
+ resolve: 2.0.0-next.5
+ semver: 6.3.1
+ string.prototype.matchall: 4.0.10
+ dev: true
+
resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==}
peerDependencies:
@@ -9421,6 +9484,13 @@ packages:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
dev: true
+ resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ has-tostringtag: 1.0.0
+ dev: true
+
resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
dependencies:
@@ -9481,6 +9551,12 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==}
+ dependencies:
+ call-bind: 1.0.5
+ dev: true
+
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
@@ -9765,6 +9841,16 @@ packages:
istanbul-lib-report: 3.0.1
dev: true
+ resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==}
+ dependencies:
+ define-properties: 1.2.1
+ get-intrinsic: 1.2.2
+ has-symbols: 1.0.3
+ reflect.getprototypeof: 1.0.4
+ set-function-name: 2.0.1
+ dev: true
+
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
engines: {node: '>=14'}
@@ -9959,6 +10045,16 @@ packages:
engines: {'0': node >= 0.2.0}
dev: true
+ resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==}
+ engines: {node: '>=4.0'}
+ dependencies:
+ array-includes: 3.1.7
+ array.prototype.flat: 1.3.2
+ object.assign: 4.1.4
+ object.values: 1.1.7
+ dev: true
+
resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
dependencies:
@@ -10785,6 +10881,13 @@ packages:
get-intrinsic: 1.2.2
dev: true
+ resolution: {integrity: sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==}
+ dependencies:
+ define-properties: 1.2.1
+ es-abstract: 1.22.3
+ dev: true
+
resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==}
engines: {node: '>= 0.4'}
@@ -11925,6 +12028,18 @@ packages:
strip-indent: 4.0.0
dev: true
+ resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.5
+ define-properties: 1.2.1
+ es-abstract: 1.22.3
+ get-intrinsic: 1.2.2
+ globalthis: 1.0.3
+ which-builtin-type: 1.1.3
+ dev: true
+
resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==}
engines: {node: '>=4'}
@@ -12043,6 +12158,15 @@ packages:
supports-preserve-symlinks-flag: 1.0.0
dev: true
+ resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==}
+ hasBin: true
+ dependencies:
+ is-core-module: 2.13.1
+ path-parse: 1.0.7
+ supports-preserve-symlinks-flag: 1.0.0
+ dev: true
+
resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==}
dependencies:
@@ -12541,6 +12665,20 @@ packages:
strip-ansi: 7.1.0
dev: true
+ resolution: {integrity: sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==}
+ dependencies:
+ call-bind: 1.0.5
+ define-properties: 1.2.1
+ es-abstract: 1.22.3
+ get-intrinsic: 1.2.2
+ has-symbols: 1.0.3
+ internal-slot: 1.0.6
+ regexp.prototype.flags: 1.5.1
+ set-function-name: 2.0.1
+ side-channel: 1.0.4
+ dev: true
+
resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==}
engines: {node: '>= 0.4'}
@@ -13783,6 +13921,24 @@ packages:
is-symbol: 1.0.4
dev: true
+ resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ function.prototype.name: 1.1.6
+ has-tostringtag: 1.0.0
+ is-async-function: 2.0.0
+ is-date-object: 1.0.5
+ is-finalizationregistry: 1.0.2
+ is-generator-function: 1.0.10
+ is-regex: 1.1.4
+ is-weakref: 1.0.2
+ isarray: 2.0.5
+ which-boxed-primitive: 1.0.2
+ which-collection: 1.0.1
+ which-typed-array: 1.1.13
+ dev: true
+
resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==}
dependencies: