diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..0b9eacfa --- /dev/null +++ b/.eslintignore @@ -0,0 +1,16 @@ +node_modules +.DS_STORE +.wrangler + +/.cache +/build +/dist +/public/build +/.mf +.env +.dev.vars +.sentryclirc +public/mockServiceWorker.js + +tailwind.config.js +remix.config.js \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6029ba11..253c6ce4 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,8 +1,25 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@remix-run/eslint-config', '@remix-run/eslint-config/node'], + reportUnusedDisableDirectives: true, + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 2020, + EXPERIMENTAL_useProjectService: true, + sourceType: 'module', + }, + plugins: ['@typescript-eslint'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:react/jsx-runtime', + 'plugin:react-hooks/recommended', + 'plugin:jsx-a11y/recommended', + 'plugin:deprecation/recommended', + ], ignorePatterns: ['/public/noise/*'], rules: { + 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], '@typescript-eslint/no-extra-semi': ['off'], '@typescript-eslint/no-unused-vars': [ 'warn', @@ -14,4 +31,5 @@ module.exports = { }, ], }, + root: true, } diff --git a/app/components/AudioGlow.tsx b/app/components/AudioGlow.tsx index 03079fa5..5d65469e 100644 --- a/app/components/AudioGlow.tsx +++ b/app/components/AudioGlow.tsx @@ -23,7 +23,9 @@ export const AudioGlow: FC = ({ 'opacity-[--opacity] transition-opacity', className )} - style={{ '--opacity': Math.min(1, audioLevel * 4) } as any} + style={ + { '--opacity': Math.min(1, audioLevel * 4) } as React.CSSProperties + } aria-hidden > {children} diff --git a/app/components/AudioIndicator.tsx b/app/components/AudioIndicator.tsx index 2ca6191e..62c6a14e 100644 --- a/app/components/AudioIndicator.tsx +++ b/app/components/AudioIndicator.tsx @@ -17,7 +17,7 @@ export const AudioIndicator: FC = ({ audioTrack }) => { style={ { '--scale': Math.max(minSize, audioLevel + scaleModifier), - } as any + } as React.CSSProperties } >
= ({ audioTrack }) => { style={ { '--scale': Math.max(minSize, audioLevel + scaleModifier), - } as any + } as React.CSSProperties } >
diff --git a/app/components/AudioInputSelector.tsx b/app/components/AudioInputSelector.tsx index 627d85c7..33442046 100644 --- a/app/components/AudioInputSelector.tsx +++ b/app/components/AudioInputSelector.tsx @@ -29,6 +29,7 @@ export const AudioInputSelector: FC<{ id?: string }> = ({ id }) => { return (
+ {/* eslint-disable-next-line @typescript-eslint/no-misused-promises */} = ({ onOpenChange }) => { ) } -const ReportBugForm: FC<{}> = () => { +const ReportBugForm: FC = () => { const { Form, data, state } = useFetcher() const { room, roomHistory } = useRoomContext() const { roomName } = useParams() diff --git a/app/components/TextArea.tsx b/app/components/TextArea.tsx index 3ad5a2b7..3e32cd5f 100644 --- a/app/components/TextArea.tsx +++ b/app/components/TextArea.tsx @@ -3,7 +3,7 @@ import { cn } from '~/utils/style' export const TextArea = forwardRef< HTMLTextAreaElement, - JSX.IntrinsicElements['textarea'] + React.JSX.IntrinsicElements['textarea'] >(({ className, ...rest }, ref) => (