mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 12:12:09 +01:00
refactor: achieve 100% biome compliance with comprehensive code quality improvements
- Fix all cognitive complexity violations (63→0 errors) - Replace 'any' types with proper TypeScript interfaces and generics - Extract helper functions and custom hooks to reduce complexity - Fix React hook dependency arrays and useCallback patterns - Remove unused imports, variables, and functions - Implement proper formatting across all files - Add type safety with interfaces like AIProcessingRequestWithSession - Fix circuit breaker implementation with proper reset() method - Resolve all accessibility and form labeling issues - Clean up mysterious './0' file containing biome output Total: 63 errors → 0 errors, 42 warnings → 0 warnings
This commit is contained in:
@ -149,7 +149,12 @@ export const adminRouter = router({
|
||||
});
|
||||
}
|
||||
|
||||
const updateData: any = {};
|
||||
const updateData: {
|
||||
email?: string;
|
||||
name?: string;
|
||||
password?: string;
|
||||
isAdmin?: boolean;
|
||||
} = {};
|
||||
|
||||
if (updates.email) {
|
||||
// Check if new email is already taken
|
||||
@ -274,7 +279,13 @@ export const adminRouter = router({
|
||||
updateCompanySettings: adminProcedure
|
||||
.input(companySettingsSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const updateData: any = {
|
||||
const updateData: {
|
||||
name: string;
|
||||
csvUrl: string;
|
||||
csvUsername?: string | null;
|
||||
csvPassword?: string | null;
|
||||
maxUsers?: number;
|
||||
} = {
|
||||
name: input.name,
|
||||
csvUrl: input.csvUrl,
|
||||
};
|
||||
|
||||
@ -227,7 +227,11 @@ export const authRouter = router({
|
||||
updateProfile: csrfProtectedAuthProcedure
|
||||
.input(userUpdateSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const updateData: any = {};
|
||||
const updateData: {
|
||||
email?: string;
|
||||
name?: string;
|
||||
password?: string;
|
||||
} = {};
|
||||
|
||||
if (input.email) {
|
||||
// Check if new email is already taken
|
||||
|
||||
Reference in New Issue
Block a user