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 { DomainException, LoggerService } from '@modules/shared';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared';
import {
AGENT_REPOSITORY,
IAgentRepository,
type IAgentRepository,
} from '../../../domain/repositories/agent.repository';
import { QualityScoreCalculator } from '../../../domain/services/quality-score.service';
import { QualityScore } from '../../../domain/value-objects/quality-score.vo';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { CommandBus } from '@nestjs/cqrs';
import { type CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter';
import { LoggerService } from '@modules/shared';
import { type LoggerService } from '@modules/shared';
import { RecalculateQualityScoreCommand } from '../commands/recalculate-quality-score/recalculate-quality-score.command';
@Injectable()

View File

@@ -1,10 +1,10 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, LoggerService } from '@modules/shared';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, type LoggerService } from '@modules/shared';
import {
AGENT_REPOSITORY,
type AgentDashboardData,
IAgentRepository,
type IAgentRepository,
} from '../../../domain/repositories/agent.repository';
import { GetAgentDashboardQuery } from './get-agent-dashboard.query';

View File

@@ -1,10 +1,10 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, LoggerService } from '@modules/shared';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared';
import {
AGENT_REPOSITORY,
type AgentPublicProfileData,
IAgentRepository,
type IAgentRepository,
} from '../../../domain/repositories/agent.repository';
import { GetAgentPublicProfileQuery } from './get-agent-public-profile.query';

View File

@@ -1,6 +1,6 @@
import { AggregateRoot } from '@modules/shared';
import { QualityScoreUpdatedEvent } from '../events/quality-score-updated.event';
import { QualityScore } from '../value-objects/quality-score.vo';
import { type QualityScore } from '../value-objects/quality-score.vo';
export interface AgentProps {
userId: string;

View File

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

View File

@@ -1,4 +1,4 @@
import { AgentEntity } from '../entities/agent.entity';
import { type AgentEntity } from '../entities/agent.entity';
export const AGENT_REPOSITORY = Symbol('AGENT_REPOSITORY');

View File

@@ -1,4 +1,4 @@
import { PrismaService } from '@modules/shared';
import { type PrismaService } from '@modules/shared';
import {
type AgentPublicProfileData,
type AgentPublicListingItem,

View File

@@ -1,10 +1,10 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '@modules/shared';
import { type PrismaService } from '@modules/shared';
import { AgentEntity } from '../../domain/entities/agent.entity';
import {
type AgentDashboardData,
type AgentPublicProfileData,
IAgentRepository,
type IAgentRepository,
type QualityScoreInputData,
} from '../../domain/repositories/agent.repository';
import { QualityScore } from '../../domain/value-objects/quality-score.vo';

View File

@@ -1,5 +1,5 @@
import { Controller, Get, NotFoundException, Param, Post, UseGuards } from '@nestjs/common';
import { CommandBus, QueryBus } from '@nestjs/cqrs';
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
import {
ApiBearerAuth,
ApiOperation,
@@ -17,7 +17,7 @@ import {
import { RecalculateQualityScoreCommand } from '../../application/commands/recalculate-quality-score/recalculate-quality-score.command';
import { GetAgentDashboardQuery } from '../../application/queries/get-agent-dashboard/get-agent-dashboard.query';
import { GetAgentPublicProfileQuery } from '../../application/queries/get-agent-public-profile/get-agent-public-profile.query';
import { AgentDashboardData, AgentPublicProfileData } from '../../domain/repositories/agent.repository';
import { type AgentDashboardData, type AgentPublicProfileData } from '../../domain/repositories/agent.repository';
@ApiTags('agents')
@Controller('agents')