chore fix eslint config and lint issues#1
Conversation
There was a problem hiding this comment.
Pull request overview
Updates ESLint configuration and cleans up lint-triggering code patterns (unused imports/vars and unnecessary eslint-disable directives) across the app.
Changes:
- Fix ESLint TypeScript preset reference and add rule overrides for tests and a specific component.
- Remove unused type imports / variables and drop unused component props.
- Remove unused component imports in
QuestionnaireDialogand remove inlineeslint-disable-next-linedirectives.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/index.ts | Removes unused type import to satisfy lint rules. |
| src/hooks/index.ts | Removes unused type import to satisfy lint rules. |
| src/app/pages/home.tsx | Removes unused props interface/parameter for lint cleanliness. |
| src/app/components/weightInput/WeightInput.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/visualization/Visualization.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/questionnaire/QuestionnaireDialog.tsx | Removes unused React hook and unused component imports. |
| src/app/components/footer/Footer.tsx | Removes unused props interface/parameter for lint cleanliness. |
| src/app/components/compositeScoreDisplay/CompositeScoreDisplay.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/calculator/Calculator.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/StatisticsBanner/StatisticsBanner.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/MainMenu/MainMenu.tsx | Removes unnecessary eslint-disable directive. |
| src/app/components/Cube3D.tsx | Removes unused variables to satisfy lint rules. |
| src/app/app.tsx | Removes unused eslint-disable directive near imports. |
| .eslintrc.json | Fixes TS ESLint preset and adds overrides for tests / a component file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/app.tsx
Outdated
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| import { Route, Routes } from 'react-router-dom'; | ||
| import Home from './pages/home'; | ||
| import React from 'react'; |
There was a problem hiding this comment.
React is imported but never used in this file (the project uses the react-jsx runtime). With npm run lint configured as --max-warnings 0, this will fail due to @typescript-eslint/no-unused-vars. Remove the unused React import.
| import React from 'react'; |
src/app/components/footer/Footer.tsx
Outdated
| import React from 'react'; | ||
| import styles from './Footer.module.scss'; | ||
|
|
||
| /* eslint-disable-next-line */ | ||
| export interface FooterProps {} | ||
|
|
||
| export function Footer(props: FooterProps) { | ||
| export function Footer() { | ||
| return ( |
There was a problem hiding this comment.
React is imported but not referenced anywhere in this component (no React.FC, and JSX uses the react-jsx runtime). This will be reported by @typescript-eslint/no-unused-vars and fail linting with --max-warnings 0. Remove the unused React import.
No description provided.