diff --git a/.eslintrc.json b/.eslintrc.json index fdcba23..cb608c4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,7 +3,7 @@ "env": { "browser": true, "es2020": true }, "extends": [ "eslint:recommended", - "@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended" ], "ignorePatterns": ["dist", ".eslintrc.cjs"], @@ -15,5 +15,31 @@ { "allowConstantExport": true } ], "@typescript-eslint/no-unused-vars": "warn" - } + }, + "overrides": [ + { + "files": [ + "src/__mocks__/**", + "src/test-utils/**", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.spec.ts", + "**/*.spec.tsx" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-unused-vars": "off", + "react-refresh/only-export-components": "off" + } + }, + { + "files": [ + "src/app/components/factorSlider/FactorSlider.tsx" + ], + "rules": { + "react-refresh/only-export-components": "off" + } + } + ] } \ No newline at end of file diff --git a/src/app/app.tsx b/src/app/app.tsx index bc6ede0..295c856 100644 --- a/src/app/app.tsx +++ b/src/app/app.tsx @@ -16,10 +16,8 @@ * along with this program. If not, see https://www.gnu.org/licenses/. */ -// 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'; export function App() { return ( diff --git a/src/app/components/Cube3D.tsx b/src/app/components/Cube3D.tsx index 27a3f3c..fb0682d 100644 --- a/src/app/components/Cube3D.tsx +++ b/src/app/components/Cube3D.tsx @@ -101,11 +101,9 @@ const Cube3D: React.FC = ({ factors }) => { // ELITE TEXT ORIENTATION: Determine if text should be flipped based on rotation const currentRotX = rotationX * Math.PI * 2; - const currentRotY = rotationY * Math.PI * 2; // Normalize rotations to 0-2π range const normalizedRotX = ((currentRotX % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); - const normalizedRotY = ((currentRotY % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); // Flip text if cube is rotated in a way that would make text upside down const shouldFlip = (normalizedRotX > Math.PI/2 && normalizedRotX < 3*Math.PI/2); diff --git a/src/app/components/MainMenu/MainMenu.tsx b/src/app/components/MainMenu/MainMenu.tsx index e71633a..a4f4b25 100644 --- a/src/app/components/MainMenu/MainMenu.tsx +++ b/src/app/components/MainMenu/MainMenu.tsx @@ -2,7 +2,6 @@ import React from 'react'; import styles from './MainMenu.module.scss'; import { Button } from 'primereact/button'; -/* eslint-disable-next-line */ export interface MainMenuProps { onMenuClick: (index: number) => void; } diff --git a/src/app/components/StatisticsBanner/StatisticsBanner.tsx b/src/app/components/StatisticsBanner/StatisticsBanner.tsx index b9c0540..c614299 100644 --- a/src/app/components/StatisticsBanner/StatisticsBanner.tsx +++ b/src/app/components/StatisticsBanner/StatisticsBanner.tsx @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import styles from './StatisticsBanner.module.scss'; import { Button } from 'primereact/button'; -/* eslint-disable-next-line */ export interface StatisticsBannerProps { facts: string[]; } diff --git a/src/app/components/calculator/Calculator.tsx b/src/app/components/calculator/Calculator.tsx index bdcd815..115c6eb 100644 --- a/src/app/components/calculator/Calculator.tsx +++ b/src/app/components/calculator/Calculator.tsx @@ -5,7 +5,6 @@ import CompositeScoreDisplay from '../compositeScoreDisplay/CompositeScoreDispla import Visualization from '../visualization/Visualization'; import FactorSlider from '../factorSlider/FactorSlider'; -/* eslint-disable-next-line */ export interface CalculatorProps { 'data-testid'?: string; } diff --git a/src/app/components/compositeScoreDisplay/CompositeScoreDisplay.tsx b/src/app/components/compositeScoreDisplay/CompositeScoreDisplay.tsx index 993e0e8..c28ebb8 100644 --- a/src/app/components/compositeScoreDisplay/CompositeScoreDisplay.tsx +++ b/src/app/components/compositeScoreDisplay/CompositeScoreDisplay.tsx @@ -11,7 +11,6 @@ interface AssessmentResult { completedAt: Date; } -/* eslint-disable-next-line */ export interface CompositeScoreDisplayProps { score: number; onQuestionnaireScoreUpdate?: (sectionIndex: number, score: number) => void; diff --git a/src/app/components/footer/Footer.tsx b/src/app/components/footer/Footer.tsx index 7d8d5ed..8a8f9d5 100644 --- a/src/app/components/footer/Footer.tsx +++ b/src/app/components/footer/Footer.tsx @@ -1,10 +1,6 @@ -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 (
Copyright © 2025, Inference-Stack.com. All rights reserved. diff --git a/src/app/components/questionnaire/QuestionnaireDialog.tsx b/src/app/components/questionnaire/QuestionnaireDialog.tsx index d5dfc35..d04e5c8 100644 --- a/src/app/components/questionnaire/QuestionnaireDialog.tsx +++ b/src/app/components/questionnaire/QuestionnaireDialog.tsx @@ -1,12 +1,10 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; import { Dialog } from 'primereact/dialog'; import { Button } from 'primereact/button'; import { RadioButton } from 'primereact/radiobutton'; import { ProgressBar } from 'primereact/progressbar'; import { Card } from 'primereact/card'; import { Badge } from 'primereact/badge'; -import { Divider } from 'primereact/divider'; -import { Tooltip } from 'primereact/tooltip'; // Assessment result interface for comprehensive tracking interface AssessmentResult { diff --git a/src/app/components/visualization/Visualization.tsx b/src/app/components/visualization/Visualization.tsx index 65c63aa..3a5f70c 100644 --- a/src/app/components/visualization/Visualization.tsx +++ b/src/app/components/visualization/Visualization.tsx @@ -4,7 +4,6 @@ import { Factor } from '../factorSlider/FactorSlider'; import { CUBE_FACE_COLORS } from '@/constants'; -/* eslint-disable-next-line */ export interface VisualizationProps { factors: Factor[]; } diff --git a/src/app/components/weightInput/WeightInput.tsx b/src/app/components/weightInput/WeightInput.tsx index aa7658b..d850a31 100644 --- a/src/app/components/weightInput/WeightInput.tsx +++ b/src/app/components/weightInput/WeightInput.tsx @@ -2,7 +2,6 @@ import { InputNumber } from 'primereact/inputnumber'; import { Factor } from '../factorSlider/FactorSlider'; import React from 'react'; -/* eslint-disable-next-line */ export interface WeightInputProps { factor: Factor; onChange: (value: number) => void; diff --git a/src/app/pages/home.tsx b/src/app/pages/home.tsx index 9766cd3..fcedb8d 100644 --- a/src/app/pages/home.tsx +++ b/src/app/pages/home.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import Calculator from '../components/calculator/Calculator'; import Footer from '../components/footer/Footer'; import MainMenu from '../components/MainMenu/MainMenu'; @@ -58,10 +58,7 @@ const dialogContents: DialogContent[] = [ }, ]; -/* eslint-disable-next-line */ -export interface HomeProps {} - -export function Home(props: HomeProps) { +export function Home() { const [visible, setVisible] = useState(false); const [currentDialog, setCurrentDialog] = useState(null); diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8be3b1d..b5d7de3 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -7,7 +7,7 @@ */ import { useState, useEffect, useCallback, useMemo, useRef } from 'react'; -import { Factor, AssessmentResults, MaturityLevel, AppError } from '../types'; +import { Factor, AssessmentResults, AppError } from '../types'; import { DEFAULT_FACTORS, STORAGE_KEYS } from '../constants'; import { AssessmentMath, StorageUtils, ErrorUtils } from '../utils'; diff --git a/src/utils/index.ts b/src/utils/index.ts index 4e4a1f7..e3a056a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -6,7 +6,7 @@ * @license AGPL-3.0 */ -import { Factor, MaturityLevel, AssessmentResults, AppError } from '../types'; +import { Factor, MaturityLevel, AppError } from '../types'; import { MATURITY_LEVELS, SCORING } from '../constants'; /**