refactor: migrate to eslint flat config and format codebase with prettier

- Remove legacy .eslintrc.cjs and .eslintignore
- Add eslint.config.js with flat config, security rules (no-eval, no-implied-eval, no-new-func, no-script-url)
- Add .prettierrc and .prettierignore
- Format entire codebase with prettier
This commit is contained in:
c0mrade
2026-01-27 17:37:31 +03:00
parent 111ccc4e7a
commit bc90ba3779
133 changed files with 19972 additions and 15523 deletions

View File

@@ -1,11 +1,11 @@
import { useEffect } from 'react'
import { useQuery } from '@tanstack/react-query'
import { themeColorsApi } from '../api/themeColors'
import { DEFAULT_THEME_COLORS } from '../types/theme'
import { applyThemeColors } from '../hooks/useThemeColors'
import { useEffect } from 'react';
import { useQuery } from '@tanstack/react-query';
import { themeColorsApi } from '../api/themeColors';
import { DEFAULT_THEME_COLORS } from '../types/theme';
import { applyThemeColors } from '../hooks/useThemeColors';
interface ThemeColorsProviderProps {
children: React.ReactNode
children: React.ReactNode;
}
export function ThemeColorsProvider({ children }: ThemeColorsProviderProps) {
@@ -15,12 +15,12 @@ export function ThemeColorsProvider({ children }: ThemeColorsProviderProps) {
staleTime: 5 * 60 * 1000, // 5 minutes
refetchOnWindowFocus: false,
retry: 1,
})
});
// Apply colors on mount and when they change
useEffect(() => {
applyThemeColors(colors || DEFAULT_THEME_COLORS)
}, [colors])
applyThemeColors(colors || DEFAULT_THEME_COLORS);
}, [colors]);
return <>{children}</>
return <>{children}</>;
}