summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eslint.config.js39
-rw-r--r--packages/cli/src/ui/App.tsx2
-rw-r--r--packages/cli/src/ui/components/SuggestionsDisplay.tsx1
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts2
-rw-r--r--packages/cli/tsconfig.json2
-rw-r--r--packages/server/src/core/prompts.ts1
6 files changed, 8 insertions, 39 deletions
diff --git a/eslint.config.js b/eslint.config.js
index 97934e81..5483f8aa 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -7,7 +7,6 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactPlugin from 'eslint-plugin-react';
-import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
import reactHooks from 'eslint-plugin-react-hooks';
import prettierConfig from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
@@ -29,7 +28,7 @@ export default tseslint.config(
{
// Global ignores
ignores: [
- 'node_modules/**',
+ 'node_modules/*',
'eslint.config.js',
'packages/cli/dist/**',
'packages/server/dist/**',
@@ -38,37 +37,9 @@ export default tseslint.config(
},
eslint.configs.recommended,
...tseslint.configs.recommended,
- {
- // React specific config
- files: ['packages/cli/src/**/*.tsx'], // Target only TSX in the cli package
- languageOptions: {
- // Keep languageOptions from reactRecommended if needed, or define explicitly
- parserOptions: {
- ecmaFeatures: { jsx: true },
- },
- globals: {
- ...globals.browser,
- },
- },
- plugins: {
- // Define the plugins used in this block
- react: reactPlugin,
- 'react-hooks': reactHooks,
- },
- rules: {
- // Apply recommended rules explicitly
- ...reactRecommended.rules,
- ...reactHooks.configs.recommended.rules,
- // Custom overrides
- 'react/react-in-jsx-scope': 'off',
- 'react/prop-types': 'off',
- },
- settings: {
- react: {
- version: 'detect',
- },
- },
- },
+ reactHooks.configs['recommended-latest'],
+ reactPlugin.configs.flat.recommended,
+ reactPlugin.configs.flat['jsx-runtime'], // Add this if you are using React 17+
{
// Import specific config
files: ['packages/cli/src/**/*.{ts,tsx}'], // Target only TS/TSX in the cli package
@@ -117,7 +88,7 @@ export default tseslint.config(
],
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'@typescript-eslint/no-unused-vars': [
- 'warn',
+ 'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx
index 3052fb17..30eb49bd 100644
--- a/packages/cli/src/ui/App.tsx
+++ b/packages/cli/src/ui/App.tsx
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import React, { useCallback, useMemo, useState } from 'react';
+import { useCallback, useMemo, useState } from 'react';
import { Box, Static, Text, useStdout } from 'ink';
import { StreamingState, type HistoryItem } from './types.js';
import { useGeminiStream } from './hooks/useGeminiStream.js';
diff --git a/packages/cli/src/ui/components/SuggestionsDisplay.tsx b/packages/cli/src/ui/components/SuggestionsDisplay.tsx
index 02dea70e..f0626fa9 100644
--- a/packages/cli/src/ui/components/SuggestionsDisplay.tsx
+++ b/packages/cli/src/ui/components/SuggestionsDisplay.tsx
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import React from 'react';
import { Box, Text } from 'ink';
export interface Suggestion {
label: string;
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index b4401eef..a51de459 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -68,7 +68,7 @@ export const useSlashCommandProcessor = (
description: '',
action: (_value: PartListUnion) => {
setDebugMessage('Quitting. Good-bye.');
- const timestamp = getNextMessageId(Date.now());
+ getNextMessageId(Date.now());
process.exit(0);
},
},
diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json
index 490ad209..7c7539e3 100644
--- a/packages/cli/tsconfig.json
+++ b/packages/cli/tsconfig.json
@@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
- "jsx": "react",
+ "jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"paths": {
"@gemini-code/*": ["./packages/*"]
diff --git a/packages/server/src/core/prompts.ts b/packages/server/src/core/prompts.ts
index aae11330..3406f146 100644
--- a/packages/server/src/core/prompts.ts
+++ b/packages/server/src/core/prompts.ts
@@ -11,7 +11,6 @@ import { GrepTool } from '../tools/grep.js';
import { ReadFileTool } from '../tools/read-file.js';
import { ReadManyFilesTool } from '../tools/read-many-files.js';
import { ShellTool } from '../tools/shell.js';
-import { WebFetchTool } from '../tools/web-fetch.js';
import { WriteFileTool } from '../tools/write-file.js';
const contactEmail = '[email protected]';