Repository: OneKeyHQ/app-monorepo
Pull request #6850: chore: Enhance ESLint configuration and clean up unused imports
Author: login: limichange
Created: 2025-03-11T02:29:45Z | Merged: 2025-03-12T11:49:33Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Streamlined internal code by removing redundant imports and optimizing dependency management for enhanced stability.

- **Chores**
  - Updated quality control configurations to enforce consistent error handling and code cleanup.

These internal improvements contribute to a cleaner, more maintainable system, which helps ensure reliable performance and a smooth overall experience for end users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/.cursor/rules/clean-unused-import.mdc b/.cursor/rules/clean-unused-import.mdc
index 9d7afbeaaa02..760c9acb62d2 100644
--- a/.cursor/rules/clean-unused-import.mdc
+++ b/.cursor/rules/clean-unused-import.mdc
@@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
 alwaysApply: false
 ---
-First directly run 'yarn run lint' to see the full warnings details. 
+# Remember
+Run the command `yarn run lint` straight away, don't add anything else because you need the full information and any extra manipulation will get you out of luck. Don't run `yarn run lint | cat`.
 
-You will see a lot of warnings. But you only need to deal with the @typescript-eslint/no-unused-vars kind. Don't worry about the rest.
+Then you help me find @typescript-eslint/no-unused-vars related warnings. Only fix unused imports, not modify function definitions or other code.
 
-But you need to follow some rules.
+I need you to fix it for me, but there are a couple of rules to be aware of.
 
-1. you can clean up the introduction of types. for example:
-```
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
+## Only fix three files. No any more.
+
+## Follow [eslint.js](mdc:development/lint/eslint.js)
+
+## You can only fix type-related ones.
+```ts
+import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types' ;
 
 import type {
   IAccountDeriveInfo,
-  IAccountDeriveTypes.
-} from '@onekeyhq/kit-bg/src/vaults/types'; import type { IAccountDeriveInfo, IAccountDeriveTypes, IAccountDeriveTypes
+  IAccountDeriveTypes
+} from '@onekeyhq/kit-bg/src/vaults/types'; 
 ```
 
-2. can clean up references to react, for example:
-```
+## You can only fix react related.
+```ts
 import { useCallback, useMemo, useRef, useState } from 'react';
 ```
 
-3. can clean up references to '@onekeyhq/components', for example:
-```
+## You can only fix '@onekeyhq/components' related.
+```ts
 import {
-  Checkbox, Dialog, React'; } from 'react';
-  useClipboard, useForm
-  useForm.
+  Checkbox, Dialog,
+  useClipboard, useForm,
+  useForm
 } from '@onekeyhq/components'
 ```
 
-4. Do not modify the code outside of the import declaration.
-
-5. Other than that, you cannot clean up the introduction of business code variables or types.
\ No newline at end of file
+## You can only fix three of the above, and you are not allowed to change the code anywhere else.
\ No newline at end of file
diff --git a/.eslintrc.js b/.eslintrc.js
index f4064e64c647..6bd5d5be089b 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -95,7 +95,14 @@ const tsRules = {
     { disallowTypeAnnotations: false },
   ],
   '@typescript-eslint/no-var-requires': 'off',
-  '@typescript-eslint/no-unused-vars': [isDev ? 'warn' : 'error'],
+  '@typescript-eslint/no-unused-vars': [
+    isDev ? 'warn' : 'error',
+    {
+      'argsIgnorePattern': '^_',
+      'varsIgnorePattern': '^_',
+      'caughtErrorsIgnorePattern': '^_',
+    },
+  ],
   '@typescript-eslint/no-use-before-define': ['error'],
   '@typescript-eslint/no-shadow': ['error'],
   '@typescript-eslint/explicit-module-boundary-types': 'off',
@@ -410,7 +417,7 @@ module.exports = {
                   'tamagui',
                   '@onekeyhq/kit',
                   '@onekeyhq/kit-bg',
-                  '@onekeyhq/components'
+                  '@onekeyhq/components',
                 ],
                 message: 'Please avoid using tamagui in this folder',
               },
diff --git a/packages/components/src/layouts/SortableListView/types.tsx b/packages/components/src/layouts/SortableListView/types.tsx
index 99669ec26ce3..253b330fc991 100644
--- a/packages/components/src/layouts/SortableListView/types.tsx
+++ b/packages/components/src/layouts/SortableListView/types.tsx
@@ -1,4 +1,3 @@
-import type { IListViewProps } from '../ListView/list';
 import type { StackStyle } from '@tamagui/web/types/types';
 import type {
   DragEndParams,
diff --git a/packages/core/src/chains/ckb/sdkCkb/index.ts b/packages/core/src/chains/ckb/sdkCkb/index.ts
index 19c79f1ada98..a031b1a39ab5 100644
--- a/packages/core/src/chains/ckb/sdkCkb/index.ts
+++ b/packages/core/src/chains/ckb/sdkCkb/index.ts
@@ -1,6 +1,6 @@
 import { utils } from '@ckb-lumos/base';
 import { getConfig as getSDKConfig } from '@ckb-lumos/config-manager';
-import { generateAddress, parseAddress } from '@ckb-lumos/helpers';
+import { generateAddress } from '@ckb-lumos/helpers';
 
 import type { Script } from '@ckb-lumos/base';
 import type { Config } from '@ckb-lumos/config-manager';
diff --git a/packages/core/src/chains/near/CoreChainSoftware.ts b/packages/core/src/chains/near/CoreChainSoftware.ts
index dd0e4cb154e3..235cbb21f70e 100644
--- a/packages/core/src/chains/near/CoreChainSoftware.ts
+++ b/packages/core/src/chains/near/CoreChainSoftware.ts
@@ -1,4 +1,3 @@
-import BN from 'bn.js';
 import { baseDecode, baseEncode } from 'borsh';
 import bs58 from 'bs58';
 import sha256 from 'js-sha256';
@@ -6,7 +5,6 @@ import { isString } from 'lodash';
 import { transactions, utils } from 'near-api-js';
 
 import { NotImplemented } from '@onekeyhq/shared/src/errors';
-import { checkIsDefined } from '@onekeyhq/shared/src/utils/assertUtils';
 import bufferUtils from '@onekeyhq/shared/src/utils/bufferUtils';
 
 import { CoreChainApiBase } from '../../base/CoreChainApiBase';
diff --git a/packages/core/src/chains/nostr/CoreChainHd.ts b/packages/core/src/chains/nostr/CoreChainHd.ts
index 9a3219f2b6a0..74675cc60d38 100644
--- a/packages/core/src/chains/nostr/CoreChainHd.ts
+++ b/packages/core/src/chains/nostr/CoreChainHd.ts
@@ -1,9 +1,5 @@
-import { NotImplemented } from '@onekeyhq/shared/src/errors';
-
 import CoreChainSoftware from './CoreChainSoftware';
 
-import type { ICoreApiGetExportedSecretKey } from '../../types';
-
 export default class CoreChainHd extends CoreChainSoftware {
   //
 }
diff --git a/packages/kit-bg/src/apis/BackgroundApiProxyBase.ts b/packages/kit-bg/src/apis/BackgroundApiProxyBase.ts
index 250cc3c2dbc8..4ed0260d4aa4 100644
--- a/packages/kit-bg/src/apis/BackgroundApiProxyBase.ts
+++ b/packages/kit-bg/src/apis/BackgroundApiProxyBase.ts
@@ -6,10 +6,8 @@ import {
   getBackgroundServiceApi,
   throwMethodNotFound,
 } from '@onekeyhq/shared/src/background/backgroundUtils';
-import { OneKeyError } from '@onekeyhq/shared/src/errors/errors/baseErrors';
 import { globalErrorHandler } from '@onekeyhq/shared/src/errors/globalErrorHandler';
 import errorToastUtils from '@onekeyhq/shared/src/errors/utils/errorToastUtils';
-import errorUtils from '@onekeyhq/shared/src/errors/utils/errorUtils';
 import type {
   EAppEventBusNames,
   IAppEventBusPayload,
diff --git a/packages/kit-bg/src/dbs/local/realm/LocalDbRealm.ts b/packages/kit-bg/src/dbs/local/realm/LocalDbRealm.ts
index 832530bf4a8b..768627420dbc 100644
--- a/packages/kit-bg/src/dbs/local/realm/LocalDbRealm.ts
+++ b/packages/kit-bg/src/dbs/local/realm/LocalDbRealm.ts
@@ -1,5 +1,3 @@
-import { ELocalDBStoreNames } from '../localDBStoreNames';
-
 import { LocalDbRealmBase } from './LocalDbRealmBase';
 
 export class LocalDbRealm extends LocalDbRealmBase {
diff --git a/packages/kit-bg/src/dbs/simple/entity/SimpleDbEntityServerNetwork.ts b/packages/kit-bg/src/dbs/simple/entity/SimpleDbEntityServerNetwork.ts
index 039c067563e0..e13e1b52bf3c 100644
--- a/packages/kit-bg/src/dbs/simple/entity/SimpleDbEntityServerNetwork.ts
+++ b/packages/kit-bg/src/dbs/simple/entity/SimpleDbEntityServerNetwork.ts
@@ -1,5 +1,5 @@
 import { backgroundMethod } from '@onekeyhq/shared/src/background/backgroundDecorators';
-import type { ENetworkStatus, IServerNetwork } from '@onekeyhq/shared/types';
+import type { IServerNetwork } from '@onekeyhq/shared/types';
 
 import { SimpleDbEntityBase } from '../base/SimpleDbEntityBase';
 
diff --git a/packages/kit-bg/src/providers/ProviderApiScdo.ts b/packages/kit-bg/src/providers/ProviderApiScdo.ts
index 63cf0e383572..3d0cc76ef8b3 100644
--- a/packages/kit-bg/src/providers/ProviderApiScdo.ts
+++ b/packages/kit-bg/src/providers/ProviderApiScdo.ts
@@ -9,10 +9,7 @@ import {
   backgroundClass,
   providerApiMethod,
 } from '@onekeyhq/shared/src/background/backgroundDecorators';
-import {
-  NotImplemented,
-  OneKeyInternalError,
-} from '@onekeyhq/shared/src/errors';
+import { OneKeyInternalError } from '@onekeyhq/shared/src/errors';
 import bufferUtils from '@onekeyhq/shared/src/utils/bufferUtils';
 import hexUtils from '@onekeyhq/shared/src/utils/hexUtils';
 import timerUtils from '@onekeyhq/shared/src/utils/timerUtils';
diff --git a/packages/kit-bg/src/providers/ProviderApiWebln.ts b/packages/kit-bg/src/providers/ProviderApiWebln.ts
index 08daab1e6131..51ed7a0f36b2 100644
--- a/packages/kit-bg/src/providers/ProviderApiWebln.ts
+++ b/packages/kit-bg/src/providers/ProviderApiWebln.ts
@@ -6,12 +6,10 @@ import {
   backgroundClass,
   providerApiMethod,
 } from '@onekeyhq/shared/src/background/backgroundDecorators';
-import { NotImplemented } from '@onekeyhq/shared/src/errors';
 import { defaultLogger } from '@onekeyhq/shared/src/logger/logger';
 import {
   EDAppConnectionModal,
   EModalRoutes,
-  EModalSendRoutes,
   EModalSignatureConfirmRoutes,
 } from '@onekeyhq/shared/src/routes';
 import type { ILNURLDetails } from '@onekeyhq/shared/types/lightning';
diff --git a/packages/kit-bg/src/providers/_ProviderApiSample.ts b/packages/kit-bg/src/providers/_ProviderApiSample.ts
index 3622c04b17d8..1c337eac9057 100644
--- a/packages/kit-bg/src/providers/_ProviderApiSample.ts
+++ b/packages/kit-bg/src/providers/_ProviderApiSample.ts
@@ -4,10 +4,7 @@ import {
   backgroundClass,
   providerApiMethod,
 } from '@onekeyhq/shared/src/background/backgroundDecorators';
-import {
-  NotImplemented,
-  OneKeyInternalError,
-} from '@onekeyhq/shared/src/errors';
+import { NotImplemented } from '@onekeyhq/shared/src/errors';
 
 import ProviderApiBase from './ProviderApiBase';
 
diff --git a/packages/kit-bg/src/vaults/impls/nostr/KeyringHd.ts b/packages/kit-bg/src/vaults/impls/nostr/KeyringHd.ts
index 1b019de52ab6..c209f372f6d3 100644
--- a/packages/kit-bg/src/vaults/impls/nostr/KeyringHd.ts
+++ b/packages/kit-bg/src/vaults/impls/nostr/KeyringHd.ts
@@ -1,7 +1,3 @@
-import {
-  getNip19EncodedPubkey,
-  getPrivateEncodedByNip19,
-} from '@onekeyhq/core/src/chains/nostr/sdkNostr';
 import coreChainApi from '@onekeyhq/core/src/instance/coreChainApi';
 import type { ISignedTxPro } from '@onekeyhq/core/src/types';
 import type { IDeviceSharedCallParams } from '@onekeyhq/shared/types/device';
diff --git a/packages/kit/src/components/RenameDialog/index.tsx b/packages/kit/src/components/RenameDialog/index.tsx
index c32580724a35..1028d0928021 100644
--- a/packages/kit/src/components/RenameDialog/index.tsx
+++ b/packages/kit/src/components/RenameDialog/index.tsx
@@ -10,11 +10,8 @@ import {
   Form,
   Input,
   Select,
-  SizableText,
   Stack,
   Toast,
-  YStack,
-  useDialogInstance,
 } from '@onekeyhq/components';
 import type { IDialogShowProps } from '@onekeyhq/components/src/composite/Dialog/type';
 import type { IDBIndexedAccount } from '@onekeyhq/kit-bg/src/dbs/local/types';
diff --git a/packages/kit/src/components/TxAction/types.ts b/packages/kit/src/components/TxAction/types.ts
index 293de9fc0059..821c61723f91 100644
--- a/packages/kit/src/components/TxAction/types.ts
+++ b/packages/kit/src/components/TxAction/types.ts
@@ -1,7 +1,6 @@
 import type { ComponentProps } from 'react';
 
 import type { IKeyOfIcons } from '@onekeyhq/components';
-import type { IApproveInfo } from '@onekeyhq/kit-bg/src/vaults/types';
 import type { ETxActionComponentType } from '@onekeyhq/shared/types';
 import type { ISwapTxInfo } from '@onekeyhq/shared/types/swap/types';
 import type {
diff --git a/packages/kit/src/views/Setting/pages/ClearAppCache/index.tsx b/packages/kit/src/views/Setting/pages/ClearAppCache/index.tsx
index 741ce8f85d43..b1aadbabb512 100644
--- a/packages/kit/src/views/Setting/pages/ClearAppCache/index.tsx
+++ b/packages/kit/src/views/Setting/pages/ClearAppCache/index.tsx
@@ -1,5 +1,5 @@
 import type { FC } from 'react';
-import { useCallback, useMemo, useRef, useState } from 'react';
+import { useState } from 'react';
 
 import { useIntl } from 'react-intl';
 
diff --git a/packages/shared/src/routes/dAppConnection.ts b/packages/shared/src/routes/dAppConnection.ts
index 05e92d60a0a4..d462a317dc54 100644
--- a/packages/shared/src/routes/dAppConnection.ts
+++ b/packages/shared/src/routes/dAppConnection.ts
@@ -1,7 +1,6 @@
 import type { INostrEvent } from '@onekeyhq/core/src/chains/nostr/types';
 import type { IUnsignedMessage } from '@onekeyhq/core/src/types';
 import type { IAddEthereumChainParameter } from '@onekeyhq/kit-bg/src/providers/ProviderApiEthereum';
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
 
 import type { EAccountSelectorSceneName } from '../../types';
 import type {


Reviews:
user: login: originalix
state: DISMISSED
author_association: COLLABORATOR
submitted_at: 2025-03-11T02:37:48Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Pro (Legacy)**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9e5815a886ef3e6959d2812ee6de97e7fa865de2 and 72bb496f094c40a9f82e9c6597154e6f909488ba.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `.cursor/rules/clean-unused-import.mdc` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: lint (20.x)
* GitHub Check: unittest (20.x)
* GitHub Check: Analyze (javascript-typescript)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>.cursor/rules/clean-unused-import.mdc (6)</summary>

`6-7`: **Clear command instruction.**

Good clarity on running the lint command without modifications. The straightforward instruction prevents information loss during linting.

---

`9-9`: **Precise scope definition.**

You've clearly limited the scope to fixing only unused imports related to the `@typescript-eslint/no-unused-vars` warning. This prevents unintended code changes.

---

`13-15`: **Well-defined constraints.**

The file limit and reference to eslint.js provide helpful boundaries for the task.

---

`17-20`: **Good example for type imports.**

Clear example showing which type-related imports can be fixed.

---

`27-30`: **Clear React imports example.**

The example clearly shows which React-related imports can be fixed.

---

`41-41`: **Clear limitation statement.**

The explicit limitation to only three types of fixes helps prevent scope creep.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T02:50:51Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>♻️ Duplicate comments (1)</summary><blockquote>

<details>
<summary>.cursor/rules/clean-unused-import.mdc (1)</summary><blockquote>

`35-37`: _🧹 Nitpick (assertive)_

**Fix duplicate `useForm` import in example.**

The example shows `useForm` imported twice, which is contradictory to a document about cleaning unused imports.



```diff
-  Checkbox, Dialog,
-  useClipboard, useForm,
-  useForm
+  Checkbox, Dialog,
+  useClipboard, useForm
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Pro (Legacy)**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 72bb496f094c40a9f82e9c6597154e6f909488ba and 860f417f55fad13ace79f31a5de8aaaf5cec1012.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `.cursor/rules/clean-unused-import.mdc` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (4)</summary>

* GitHub Check: Analyze (javascript-typescript)
* GitHub Check: lint (20.x)
* GitHub Check: unittest (20.x)
* GitHub Check: Analyze (java-kotlin)

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>.cursor/rules/clean-unused-import.mdc (2)</summary>

`6-9`: **Clear instruction improves clarity.**

The updated command instructions are specific and helpful. The warning against using pipe operators prevents information loss when viewing lint results.

---

`17-20`: **Good explanation of type-related fixes.**

The rule and example clearly show what type-related imports can be fixed.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T02:59:48Z
user: login: weatherstar
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T11:37:18Z
user: login: originalix
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-12T11:49:32Z

Review comments:
diff_hunk: @@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
 alwaysApply: false
 ---
-First directly run 'yarn run lint' to see the full warnings details. 
+# Remember
+Run the command `yarn run lint` straight away, don't add anything else because you need the full information and any extra manipulation will get you out of luck. Don't run `yarn run lint | cat`.
 
-You will see a lot of warnings. But you only need to deal with the @typescript-eslint/no-unused-vars kind. Don't worry about the rest.
+Then you help me find @typescript-eslint/no-unused-vars related warnings. Only fix unused imports, not modify function definitions or other code.
 
-But you need to follow some rules.
+I need you to fix it for me, but there are a couple of rules to be aware of.
 
-1. you can clean up the introduction of types. for example:
-```
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
+## Only fix three files. No any more.
+
+## Follow [eslint.js](mdc:development/lint/eslint.js)
+
+## You can only fix type-related ones.
+```ts
+import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types' ;
 
 import type {
   IAccountDeriveInfo,
   IAccountDeriveTypes.
path: .cursor/rules/clean-unused-import.mdc
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Fix typo in example.**

There's a period instead of a comma after `IAccountDeriveTypes`.

```diff
-  IAccountDeriveTypes.
+  IAccountDeriveTypes,
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
  IAccountDeriveTypes,
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-12T02:50:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
 alwaysApply: false
 ---
-First directly run 'yarn run lint' to see the full warnings details. 
+# Remember
+Run the command `yarn run lint` straight away, don't add anything else because you need the full information and any extra manipulation will get you out of luck. Don't run `yarn run lint | cat`.
 
-You will see a lot of warnings. But you only need to deal with the @typescript-eslint/no-unused-vars kind. Don't worry about the rest.
+Then you help me find @typescript-eslint/no-unused-vars related warnings. Only fix unused imports, not modify function definitions or other code.
 
-But you need to follow some rules.
+I need you to fix it for me, but there are a couple of rules to be aware of.
 
-1. you can clean up the introduction of types. for example:
-```
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
+## Only fix three files. No any more.
+
+## Follow [eslint.js](mdc:development/lint/eslint.js)
+
+## You can only fix type-related ones.
+```ts
+import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types' ;
 
 import type {
   IAccountDeriveInfo,
   IAccountDeriveTypes.
-} from '@onekeyhq/kit-bg/src/vaults/types'; import type { IAccountDeriveInfo, IAccountDeriveTypes, IAccountDeriveTypes
+} from '@onekeyhq/kit-bg/src/vaults/types'; 
 ```
 
-2. can clean up references to react, for example:
-```
+## You can only fix react related.
+```ts
 import { useCallback, useMemo, useRef, useState } from 'react';
 ```
 
-3. can clean up references to '@onekeyhq/components', for example:
-```
+## You can only fix '@onekeyhq/components' related.
+```ts
 import {
-  Checkbox, Dialog, React'; } from 'react';
+  Checkbox, Dialog. 
   useClipboard, useForm
-  useForm.
+  useForm
 } from '@onekeyhq/components'
path: .cursor/rules/clean-unused-import.mdc
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Fix component import example.**

There are two issues with this example:
1. Line 35 has a period instead of a comma after "Dialog"
2. "useForm" appears twice (lines 36 and 37)

```diff
-  Checkbox, Dialog. 
+  Checkbox, Dialog, 
   useClipboard, useForm
-  useForm
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
import {
  Checkbox, Dialog, 
  useClipboard, useForm
} from '@onekeyhq/components'
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-12T02:50:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
path: .cursor/rules/clean-unused-import.mdc
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**The `globs:` line lacks a value.**

The `globs:` field requires a value to specify which files the rule applies to. Add file patterns after the colon.


```diff
-globs: 
+globs: ["**/*.ts", "**/*.tsx"]
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
globs: ["**/*.ts", "**/*.tsx"]
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-12T02:59:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
 alwaysApply: false
 ---
-First directly run 'yarn run lint' to see the full warnings details. 
+# Remember
+Run the command `yarn run lint` straight away, don't add anything else because you need the full information and any extra manipulation will get you out of luck. Don't run `yarn run lint | cat`.
 
-You will see a lot of warnings. But you only need to deal with the @typescript-eslint/no-unused-vars kind. Don't worry about the rest.
+Then you help me find @typescript-eslint/no-unused-vars related warnings. Only fix unused imports, not modify function definitions or other code.
 
-But you need to follow some rules.
+I need you to fix it for me, but there are a couple of rules to be aware of.
 
-1. you can clean up the introduction of types. for example:
-```
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
+## Only fix three files. No any more.
+
+## Follow [eslint.js](mdc:development/lint/eslint.js)
+
path: .cursor/rules/clean-unused-import.mdc
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Provide more context about the three-file limit.**

The rule limits fixes to three files but doesn't explain why. Add a brief explanation for better understanding.


```diff
-## Only fix three files. No any more.
+## Only fix three files maximum per PR.
+
+This limit helps ensure focused changes and easier code reviews.
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
## Only fix three files maximum per PR.

This limit helps ensure focused changes and easier code reviews.

## Follow [eslint.js](mdc:development/lint/eslint.js)
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-12T02:59:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,38 +1,41 @@
 ---
 description: Remove useless import declaration code.
-globs: *.tsx, *.ts
+globs: 
 alwaysApply: false
 ---
-First directly run 'yarn run lint' to see the full warnings details. 
+# Remember
+Run the command `yarn run lint` straight away, don't add anything else because you need the full information and any extra manipulation will get you out of luck. Don't run `yarn run lint | cat`.
 
-You will see a lot of warnings. But you only need to deal with the @typescript-eslint/no-unused-vars kind. Don't worry about the rest.
+Then you help me find @typescript-eslint/no-unused-vars related warnings. Only fix unused imports, not modify function definitions or other code.
 
-But you need to follow some rules.
+I need you to fix it for me, but there are a couple of rules to be aware of.
 
-1. you can clean up the introduction of types. for example:
-```
-import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types';
+## Only fix three files. No any more.
+
+## Follow [eslint.js](mdc:development/lint/eslint.js)
+
+## You can only fix type-related ones.
+```ts
+import type { IAccountDeriveTypes } from '@onekeyhq/kit-bg/src/vaults/types' ;
 
 import type {
   IAccountDeriveInfo,
-  IAccountDeriveTypes.
-} from '@onekeyhq/kit-bg/src/vaults/types'; import type { IAccountDeriveInfo, IAccountDeriveTypes, IAccountDeriveTypes
+  IAccountDeriveTypes
+} from '@onekeyhq/kit-bg/src/vaults/types'; 
 ```
 
-2. can clean up references to react, for example:
-```
+## You can only fix react related.
+```ts
 import { useCallback, useMemo, useRef, useState } from 'react';
 ```
 
-3. can clean up references to '@onekeyhq/components', for example:
-```
+## You can only fix '@onekeyhq/components' related.
+```ts
 import {
-  Checkbox, Dialog, React'; } from 'react';
-  useClipboard, useForm
-  useForm.
+  Checkbox, Dialog,
+  useClipboard, useForm,
+  useForm
 } from '@onekeyhq/components'
 ```
 
-4. Do not modify the code outside of the import declaration.
-
-5. Other than that, you cannot clean up the introduction of business code variables or types.
\ No newline at end of file
+## You can only fix three of the above, and you are not allowed to change the code anywhere else.
path: .cursor/rules/clean-unused-import.mdc
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**The final instruction needs a closing markdown code block.**

The code block at the end is not properly closed with triple backticks.


```diff
-## You can only fix three of the above, and you are not allowed to change the code anywhere else.
+## You can only fix three of the above, and you are not allowed to change the code anywhere else.
+```
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
## You can only fix three of the above, and you are not allowed to change the code anywhere else.
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-12T02:59:47Z
author_association: CONTRIBUTOR

PR comments:
user: login: codesandbox[bot]
created_at: 2025-03-11T02:29:48Z
body: #### Review or Edit in CodeSandbox

Open the branch in <a href="https://codesandbox.io/p/github/OneKeyHQ/app-monorepo/eslint-no-unused-vars?mode=review&utm_source=gh_app">Web Editor</a> &bull; <a href="https://codesandbox.io/p/vscode?owner=OneKeyHQ&repo=app-monorepo&branch=eslint-no-unused-vars&utm_source=gh_app">VS Code</a> &bull; <a href="https://codesandbox.io/p/vscode?owner=OneKeyHQ&repo=app-monorepo&branch=eslint-no-unused-vars&insiders=true&utm_source=gh_app">Insiders</a><br>
Open <a href="https://codesandbox.io/p/devtool/preview/OneKeyHQ/app-monorepo/eslint-no-unused-vars?task=preview&port=51423&redirect=true&utm_source=gh_app">Preview</a>

<!-- open-in-codesandbox:complete -->

author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-03-11T02:29:55Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes involve cleaning up the code by removing unused imports and refining configuration settings. The documentation for handling unused imports has been rephrased for clarity. ESLint rules have been updated to ignore variables with names starting with an underscore, and a minor formatting fix has been applied. Several modules across core, kit-bg, kit, and shared packages have had unused dependencies removed. There are no modifications to the public API or control flow.

## Changes

| File(s) | Change Summary |
|---------|----------------|
| `.cursor/rules/clean-unused-import.mdc`, `.eslintrc.js` | Rephrased documentation for unused imports and updated lint rules. ESLint now ignores variables with names starting with `_`, and a minor formatting fix was made. |
| `packages/components/.../SortableListView/types.tsx`, `packages/core/.../sdkCkb/index.ts`, `packages/core/.../CoreChainSoftware.ts`, `packages/core/.../CoreChainHd.ts` | Removed unused imports such as `IListViewProps`, `parseAddress`, `BN`, `checkIsDefined`, and `NotImplemented`. |
| `packages/kit-bg/.../BackgroundApiProxyBase.ts`, `packages/kit-bg/.../LocalDbRealm.ts`, `packages/kit-bg/.../SimpleDbEntityServerNetwork.ts`, `packages/kit-bg/.../ProviderApiScdo.ts`, `packages/kit-bg/.../ProviderApiWebln.ts`, `packages/kit-bg/.../_ProviderApiSample.ts`, `packages/kit-bg/.../KeyringHd.ts` | Removed unused error handlers, database constants, types, and functions to streamline dependencies. |
| `packages/kit/src/components/RenameDialog/index.tsx`, `packages/kit/src/components/TxAction/types.ts`, `packages/kit/src/views/.../ClearAppCache/index.tsx` | Eliminated unused imports including components, hooks, and types to reduce the dependency footprint. |
| `packages/shared/.../dAppConnection.ts` | Removed an unused type import to simplify account derivation references. |

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4NY+CtcgBRDLEwMSzgMoAZeBlwFDAAzeCJsKnF8LEx6BitMSGxuJIxsRDoUZm57XEQDADlsZgFKLgA2AA4AVgAGAwBVDIouC3hmeFtMUiN9Y3AoMnp8YJwCYjJlGjiWNgCuXn5hUXEpGXkmJSpVdS0dPpMoOFRURLQ8QlJySMymVnYuKgB3SERi5jQKeTkFLZU1TTaXRgQz9UwGDQMCKIewAego2CsiFh8RImDA2DSGVoYHaOQommYtAYHAMACIKQYAMRUyAAQQAkhNrtRMm9WJ95CNGG4MKR8gY4J4unzpCgsLhYJ5aPgoXNAv4JPgLFJ0JAHNxYFREP4iOgMPQHIhcAixBFdfxRpLPP5jaaohhkMF7JBebQ2nzUulMnjcsh/DBZNwSF4GBR4NxAqEkRoYFLILR4A4xJJPAR1ZjINbIB7AncPgbXWgZCQyJBmIp4KFMumSNk3DqAF6eEgAD1EeAt6kgT3Udjw6FoiYdaAsCg5BuQtcdEWFLG4Vho4udFA+DpQyEEuG05FosaFkGdUOQDdeCGC00PFBY5coJAs8ngSgCVdkFqenwwuqn+FewYYVadKOD6DrQRo6p6AAGAACuBBtIYYRrgYDSLmsIYIQmLejiEifIgkE9p+376nE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9seyPZELQCanRAA+AdRbheyVFITAGqoh9kdQ/6+CsJI0nCYwSv4vQDJ7FcxAyBglMBMQuAaxOGCkDQAIYVE3ZDRI1niw/e2svGAPlYntD8Oo2TlkRJtC0chhorUsOK0NYxpBGinO2spWwIRRcCT8Agq5MRkvApYTs6ylsFyHrgHh7cTVmWh1ZST0Z72U4u6Spm80ghL1H2P42JmQ57Q5hMWrBx5o7C9GewlTqAIM5NjSZLDKaGtHsgMA858ZSgIXJgJ+Q+wwwi0E50qb9ltJtYhNFNCSiYB+UFwiIJrAVB68Nigc6Xt5IvHy9xZfMwKQLJlklde6W+RBuVx4H8p5ssuB2WPIWouzJ57siGHFKaoJTcSSUq3IxOcy5sR2UmZWYO1Vmu91Zms/3isEDnFTLMoIQ4LfGGCwMLgyomYPcHmDqg0ALwPat8A2B8ltgAIPYMCEMCIL8w6gXpE+EQC9IjOx2OgL0kaSBA+gBgRBfEJIDVBKgsQ6oGgEqCVBygMkAAMwkByg8Q6oPENoAAAmThRItLDlAlA8QgAOwkAFFwQHheUGqBKAJFJClhQMEgAKKJFqgAACzxDygwQWoPEMMUMBDFtQNAPEOCCVAZF8QhgOosUVcLDFwi4IPEPMWGLeFxibRYgr4W1Bgghi2ISouqDVBVFtAWIQIqljKK7FAi2IWgA0UkBKgaANJcEGqAeAGAsQ2oLEK0XMKyFswChVQpoVJQ6FtAXpIKn0BAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=OneKeyHQ/app-monorepo&utm_content=6850):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` or `Summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR