fix: resolve ESLint errors — remove unused imports and dead code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { pgTable, uuid, varchar, text, timestamp, boolean, uniqueIndex } from 'drizzle-orm/pg-core'
|
||||
import { pgTable, uuid, varchar, text, timestamp, boolean } from 'drizzle-orm/pg-core'
|
||||
import { users } from './users.js'
|
||||
|
||||
export const permissions = pgTable('permission', {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { pgTable, uuid, varchar, timestamp, pgEnum, uniqueIndex, boolean } from 'drizzle-orm/pg-core'
|
||||
import { pgTable, uuid, varchar, timestamp, pgEnum, boolean } from 'drizzle-orm/pg-core'
|
||||
|
||||
export const userRoleEnum = pgEnum('user_role', [
|
||||
'admin',
|
||||
|
||||
@@ -950,17 +950,6 @@ async function seedInventory(sql: any) {
|
||||
console.log(' Inventory seed complete.')
|
||||
}
|
||||
|
||||
// Returns dates (YYYY-MM-DD) for every occurrence of `dayOfWeek` (0=Sun)
|
||||
// starting from `startDate`, for `count` weeks.
|
||||
function weeklyDates(startDate: string, dayOfWeek: number, count: number): string[] {
|
||||
const d = new Date(startDate + 'T12:00:00Z')
|
||||
while (d.getUTCDay() !== dayOfWeek) d.setUTCDate(d.getUTCDate() + 1)
|
||||
return Array.from({ length: count }, (_, i) => {
|
||||
const nd = new Date(d)
|
||||
nd.setUTCDate(nd.getUTCDate() + i * 7)
|
||||
return nd.toISOString().split('T')[0]
|
||||
})
|
||||
}
|
||||
|
||||
async function seedLessons(sql: any) {
|
||||
console.log('\nSeeding lessons data...')
|
||||
|
||||
Reference in New Issue
Block a user