diff --git a/.eslintrc.js b/.eslintrc.js index d747db8e..2db5d047 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,12 +6,18 @@ module.exports = { // necessary to pickup project-specific overrides in prettierrc.js 'prettier', ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: './tsconfig.json', // Adjust the path if necessary + tsconfigRootDir: __dirname, + }, plugins: ['react-hooks', 'jsx-a11y'], rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unnecessary-condition': 'error', 'react/no-unescaped-entities': 'off', }, }; diff --git a/src/app/LayoutUI.tsx b/src/app/LayoutUI.tsx index 449706e8..491d56b2 100644 --- a/src/app/LayoutUI.tsx +++ b/src/app/LayoutUI.tsx @@ -10,7 +10,7 @@ import styles from './LayoutUI.module.scss'; export function LayoutUI({ children }: { children: React.ReactNode }) { const segments = useSelectedLayoutSegments(); - const embed = Boolean(segments?.includes('embed')); + const embed = Boolean(segments.includes('embed')); return (