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,41 +1,41 @@
// Theme color settings interface
export interface ThemeColors {
// Main accent color
accent: string
accent: string;
// Dark theme
darkBackground: string
darkSurface: string
darkText: string
darkTextSecondary: string
darkBackground: string;
darkSurface: string;
darkText: string;
darkTextSecondary: string;
// Light theme
lightBackground: string
lightSurface: string
lightText: string
lightTextSecondary: string
lightBackground: string;
lightSurface: string;
lightText: string;
lightTextSecondary: string;
// Status colors
success: string
warning: string
error: string
success: string;
warning: string;
error: string;
}
export interface ThemeSettings extends ThemeColors {
id?: number
updated_at?: string
id?: number;
updated_at?: string;
}
// Enabled themes settings
export interface EnabledThemes {
dark: boolean
light: boolean
dark: boolean;
light: boolean;
}
export const DEFAULT_ENABLED_THEMES: EnabledThemes = {
dark: true,
light: true,
}
};
// Default theme colors
export const DEFAULT_THEME_COLORS: ThemeColors = {
@@ -54,15 +54,17 @@ export const DEFAULT_THEME_COLORS: ThemeColors = {
success: '#22c55e',
warning: '#f59e0b',
error: '#ef4444',
}
};
// Color shade levels for palette generation
export const SHADE_LEVELS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const
export const SHADE_LEVELS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;
// Extended shade levels including 850 for dark palette
export const EXTENDED_SHADE_LEVELS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 850, 900, 950] as const
export const EXTENDED_SHADE_LEVELS = [
50, 100, 200, 300, 400, 500, 600, 700, 800, 850, 900, 950,
] as const;
export type ShadeLevel = (typeof SHADE_LEVELS)[number]
export type ExtendedShadeLevel = (typeof EXTENDED_SHADE_LEVELS)[number]
export type ShadeLevel = (typeof SHADE_LEVELS)[number];
export type ExtendedShadeLevel = (typeof EXTENDED_SHADE_LEVELS)[number];
export type ColorPalette = Record<ShadeLevel | 850, string>
export type ColorPalette = Record<ShadeLevel | 850, string>;