Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"
}
}
]
}
2 changes: 0 additions & 2 deletions src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 0 additions & 2 deletions src/app/components/Cube3D.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ const Cube3D: React.FC<Cube3DProps> = ({ 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);
Expand Down
1 change: 0 additions & 1 deletion src/app/components/MainMenu/MainMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/app/components/StatisticsBanner/StatisticsBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
}
Expand Down
1 change: 0 additions & 1 deletion src/app/components/calculator/Calculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface AssessmentResult {
completedAt: Date;
}

/* eslint-disable-next-line */
export interface CompositeScoreDisplayProps {
score: number;
onQuestionnaireScoreUpdate?: (sectionIndex: number, score: number) => void;
Expand Down
6 changes: 1 addition & 5 deletions src/app/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className={styles['footer']}>
Copyright &copy; 2025, Inference-Stack.com. All rights reserved.
Expand Down
4 changes: 1 addition & 3 deletions src/app/components/questionnaire/QuestionnaireDialog.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/app/components/visualization/Visualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Factor } from '../factorSlider/FactorSlider';
import { CUBE_FACE_COLORS } from '@/constants';


/* eslint-disable-next-line */
export interface VisualizationProps {
factors: Factor[];
}
Expand Down
1 change: 0 additions & 1 deletion src/app/components/weightInput/WeightInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 2 additions & 5 deletions src/app/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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<boolean>(false);
const [currentDialog, setCurrentDialog] = useState<DialogContent | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down