From 75693ecbad807fdf950e2babba4f4e67513a3506 Mon Sep 17 00:00:00 2001 From: James Brunton Date: Tue, 2 Sep 2025 18:25:06 +0100 Subject: [PATCH] Enable ESLint no-empty-object-type rule --- frontend/eslint.config.mjs | 8 +++++++- .../components/tools/shared/SuggestedToolsSection.tsx | 2 +- frontend/src/types/parameters.ts | 9 ++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 7922013cb..4f38e2ea9 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -22,7 +22,13 @@ export default defineConfig( "no-case-declarations": "off", // Temporarily disabled until codebase conformant "prefer-const": "off", // Temporarily disabled until codebase conformant "@typescript-eslint/ban-ts-comment": "off", // Temporarily disabled until codebase conformant - "@typescript-eslint/no-empty-object-type": "off", // Temporarily disabled until codebase conformant + "@typescript-eslint/no-empty-object-type": [ + "error", + { + // Allow empty extending interfaces because there's no real reason not to, and it makes it obvious where to put extra attributes in the future + allowInterfaces: 'with-single-extends', + } + ], "@typescript-eslint/no-explicit-any": "off", // Temporarily disabled until codebase conformant "@typescript-eslint/no-require-imports": "off", // Temporarily disabled until codebase conformant "@typescript-eslint/no-unused-expressions": "off", // Temporarily disabled until codebase conformant diff --git a/frontend/src/components/tools/shared/SuggestedToolsSection.tsx b/frontend/src/components/tools/shared/SuggestedToolsSection.tsx index fca3b5e56..1a001de2c 100644 --- a/frontend/src/components/tools/shared/SuggestedToolsSection.tsx +++ b/frontend/src/components/tools/shared/SuggestedToolsSection.tsx @@ -3,7 +3,7 @@ import { Stack, Text, Divider, Card, Group } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { useSuggestedTools } from '../../../hooks/useSuggestedTools'; -export interface SuggestedToolsSectionProps {} +export type SuggestedToolsSectionProps = object; export function SuggestedToolsSection(): React.ReactElement { const { t } = useTranslation(); diff --git a/frontend/src/types/parameters.ts b/frontend/src/types/parameters.ts index 6f8856a8b..91355cb81 100644 --- a/frontend/src/types/parameters.ts +++ b/frontend/src/types/parameters.ts @@ -1,7 +1,6 @@ // Base parameter interfaces for reusable patterns -export interface BaseParameters { - // Base interface that all tool parameters should extend - // Provides a foundation for adding common properties across all tools - // Examples of future additions: userId, sessionId, commonFlags, etc. -} \ No newline at end of file +// Base interface that all tool parameters should extend +// Provides a foundation for adding common properties across all tools +// Examples of future additions: userId, sessionId, commonFlags, etc. +export type BaseParameters = object