fix(lint): enforce consistent-type-imports and fix import ordering across codebase

Auto-fix 862 lint errors: convert value imports used only as types to
`import type`, fix import group ordering in seed.ts and du-an-api.ts,
remove unused imports in auth controller, and clean up stale eslint-disable
comments referencing non-existent rules.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-16 05:13:56 +07:00
parent 86adcf7295
commit c920934fb6
296 changed files with 692 additions and 659 deletions

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { createId } from '@paralleldrive/cuid2';
import { DomainException, NotFoundException, ValidationException, PrismaService, LoggerService } from '@modules/shared';
import { DomainException, NotFoundException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared';
import { LeadEntity } from '../../../domain/entities/lead.entity';
import { LEAD_REPOSITORY, ILeadRepository } from '../../../domain/repositories/lead.repository';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { LeadScore } from '../../../domain/value-objects/lead-score.vo';
import { CreateLeadCommand } from './create-lead.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { LEAD_REPOSITORY, ILeadRepository } from '../../../domain/repositories/lead.repository';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { DeleteLeadCommand } from './delete-lead.command';
@CommandHandler(DeleteLeadCommand)

View File

@@ -1,8 +1,8 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { LeadStatus } from '../../../domain/entities/lead.entity';
import { LEAD_REPOSITORY, ILeadRepository } from '../../../domain/repositories/lead.repository';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared';
import { type LeadStatus } from '../../../domain/entities/lead.entity';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { UpdateLeadStatusCommand } from './update-lead-status.command';
@CommandHandler(UpdateLeadStatusCommand)

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { LEAD_REPOSITORY, ILeadRepository, LeadStatsData } from '../../../domain/repositories/lead.repository';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared';
import { LEAD_REPOSITORY, type ILeadRepository, type LeadStatsData } from '../../../domain/repositories/lead.repository';
import { GetLeadStatsQuery } from './get-lead-stats.query';
@QueryHandler(GetLeadStatsQuery)

View File

@@ -1,8 +1,8 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { LeadReadDto } from '../../../domain/repositories/lead-read.dto';
import { LEAD_REPOSITORY, ILeadRepository, PaginatedResult } from '../../../domain/repositories/lead.repository';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared';
import { type LeadReadDto } from '../../../domain/repositories/lead-read.dto';
import { LEAD_REPOSITORY, type ILeadRepository, type PaginatedResult } from '../../../domain/repositories/lead.repository';
import { GetLeadsByAgentQuery } from './get-leads-by-agent.query';
@QueryHandler(GetLeadsByAgentQuery)

View File

@@ -1,7 +1,7 @@
import { AggregateRoot, ValidationException } from '@modules/shared';
import { LeadCreatedEvent } from '../events/lead-created.event';
import { LeadStatusChangedEvent } from '../events/lead-status-changed.event';
import { LeadScore } from '../value-objects/lead-score.vo';
import { type LeadScore } from '../value-objects/lead-score.vo';
export type LeadStatus = 'NEW' | 'CONTACTED' | 'QUALIFIED' | 'NEGOTIATING' | 'CONVERTED' | 'LOST';

View File

@@ -1,4 +1,4 @@
import { DomainEvent } from '@modules/shared';
import { type DomainEvent } from '@modules/shared';
export class LeadCreatedEvent implements DomainEvent {
readonly eventName = 'lead.created';

View File

@@ -1,4 +1,4 @@
import { DomainEvent } from '@modules/shared';
import { type DomainEvent } from '@modules/shared';
export class LeadStatusChangedEvent implements DomainEvent {
readonly eventName = 'lead.status_changed';

View File

@@ -1,5 +1,5 @@
import { LeadEntity } from '../entities/lead.entity';
import { LeadReadDto } from './lead-read.dto';
import { type LeadEntity } from '../entities/lead.entity';
import { type LeadReadDto } from './lead-read.dto';
export const LEAD_REPOSITORY = Symbol('LEAD_REPOSITORY');