We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8a3c55 commit bcf5b9eCopy full SHA for bcf5b9e
2 files changed
eslint.config.js
@@ -6,7 +6,14 @@ import tseslint from 'typescript-eslint'
6
import { globalIgnores } from 'eslint/config'
7
8
export default tseslint.config([
9
- globalIgnores(['dist']),
+ globalIgnores([
10
+ 'dist',
11
+ 'Extremer/frontend/wailsjs/**',
12
+ 'Landing/.astro/**',
13
+ 'dev/instructions/**',
14
+ 'docsite/docs/.vitepress/cache/**',
15
+ 'src/components/iconfonts/**',
16
+ ]),
17
{
18
files: ['**/*.{ts,tsx}'],
19
extends: [
@@ -19,5 +26,15 @@ export default tseslint.config([
26
ecmaVersion: 2020,
20
27
globals: globals.browser,
21
28
},
29
+ rules: {
30
+ '@typescript-eslint/no-explicit-any': 'off',
31
+ '@typescript-eslint/no-unused-expressions': 'warn',
32
+ '@typescript-eslint/no-unused-vars': 'warn',
33
+ 'no-case-declarations': 'warn',
34
+ 'no-constant-binary-expression': 'warn',
35
+ 'no-useless-escape': 'warn',
36
+ 'prefer-const': 'warn',
37
+ 'react-refresh/only-export-components': 'off',
38
+ },
22
39
23
40
])
src/components/panels/main/SearchPanel.tsx
@@ -38,9 +38,6 @@ function SearchPanel() {
const allowSearch = !isEmbed || isCapAllowed("allowSearch");
const allowAI = !isEmbed || isCapAllowed("allowAI");
41
- // 若搜索被禁用,整个面板不渲染
42
- if (!allowSearch) return null;
43
-
44
// 状态
45
const [searchValue, setSearchValue] = useState("");
46
const [options, setOptions] = useState<AutoCompleteProps["options"]>([]);
@@ -327,6 +324,9 @@ function SearchPanel() {
327
324
[],
328
325
);
329
326
+ // 若搜索被禁用,整个面板不渲染
+ if (!allowSearch) return null;
+
330
return (
331
<div ref={containerRef} className={panelClass}>
332
<AutoComplete
0 commit comments