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,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
export class GenerateReportCommand {
constructor(

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { DomainException, LoggerService } from '@modules/shared';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
type MarketReportResult,
} from '../../../domain/repositories/market-index.repository';
import { GenerateReportCommand } from './generate-report.command';

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { DomainException, LoggerService } from '@modules/shared';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared';
import { TrackEventCommand } from './track-event.command';
export interface TrackEventResult {

View File

@@ -1,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
export class UpdateMarketIndexCommand {
constructor(

View File

@@ -1,10 +1,10 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, LoggerService } from '@modules/shared';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, type CacheService, CachePrefix, type LoggerService } from '@modules/shared';
import { MarketIndexEntity } from '../../../domain/entities/market-index.entity';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
} from '../../../domain/repositories/market-index.repository';
import { UpdateMarketIndexCommand } from './update-market-index.command';

View File

@@ -1,10 +1,10 @@
import { Inject } from '@nestjs/common';
import { EventsHandler, IEventHandler, CommandBus } from '@nestjs/cqrs';
import { EventsHandler, type IEventHandler, type CommandBus } from '@nestjs/cqrs';
import { ListingCreatedEvent, ModerateListingCommand } from '@modules/listings';
import { PrismaService, LoggerService } from '@modules/shared';
import { type PrismaService, type LoggerService } from '@modules/shared';
import {
AI_SERVICE_CLIENT,
IAiServiceClient,
type IAiServiceClient,
} from '../../infrastructure/services/ai-service.client';
const AUTO_REJECT_THRESHOLD = 0.8;

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, Cacheable, LoggerService } from '@modules/shared';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, type CacheService, CachePrefix, CacheTTL, Cacheable, type LoggerService } from '@modules/shared';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
type DistrictStatsResult,
} from '../../../domain/repositories/market-index.repository';
import { GetDistrictStatsQuery } from './get-district-stats.query';

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
type HeatmapDataPoint,
} from '../../../domain/repositories/market-index.repository';
import { GetHeatmapQuery } from './get-heatmap.query';

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
type MarketReportResult,
} from '../../../domain/repositories/market-index.repository';
import { GetMarketReportQuery } from './get-market-report.query';

View File

@@ -1,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
export class GetMarketReportQuery {
constructor(

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
import {
MARKET_INDEX_REPOSITORY,
IMarketIndexRepository,
type IMarketIndexRepository,
type PriceTrendPoint,
} from '../../../domain/repositories/market-index.repository';
import { GetPriceTrendQuery } from './get-price-trend.query';

View File

@@ -1,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
export class GetPriceTrendQuery {
constructor(

View File

@@ -1,9 +1,9 @@
import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
import {
AVM_SERVICE,
IAVMService,
type IAVMService,
type ValuationResult,
} from '../../../domain/services/avm-service';
import { GetValuationQuery } from './get-valuation.query';

View File

@@ -1,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
export class GetValuationQuery {
constructor(

View File

@@ -1,4 +1,4 @@
import { PropertyType } from '@prisma/client';
import { type PropertyType } from '@prisma/client';
import { AggregateRoot } from '@modules/shared';
import { MarketIndexUpdatedEvent } from '../events/market-index-updated.event';

View File

@@ -1,4 +1,4 @@
import { DomainEvent } from '@modules/shared';
import { type DomainEvent } from '@modules/shared';
export class MarketIndexUpdatedEvent implements DomainEvent {
readonly eventName = 'market-index.updated';

View File

@@ -1,5 +1,5 @@
import { PropertyType } from '@prisma/client';
import { MarketIndexEntity } from '../entities/market-index.entity';
import { type PropertyType } from '@prisma/client';
import { type MarketIndexEntity } from '../entities/market-index.entity';
export const MARKET_INDEX_REPOSITORY = Symbol('MARKET_INDEX_REPOSITORY');

View File

@@ -1,4 +1,4 @@
import { ValuationEntity } from '../entities/valuation.entity';
import { type ValuationEntity } from '../entities/valuation.entity';
export const VALUATION_REPOSITORY = Symbol('VALUATION_REPOSITORY');

View File

@@ -1,9 +1,9 @@
import { Injectable } from '@nestjs/common';
import { MarketIndex as PrismaMarketIndex, PropertyType } from '@prisma/client';
import { PrismaService } from '@modules/shared';
import { MarketIndexEntity, MarketIndexProps } from '../../domain/entities/market-index.entity';
import { type MarketIndex as PrismaMarketIndex, type PropertyType } from '@prisma/client';
import { type PrismaService } from '@modules/shared';
import { MarketIndexEntity, type MarketIndexProps } from '../../domain/entities/market-index.entity';
import {
IMarketIndexRepository,
type IMarketIndexRepository,
type MarketReportResult,
type HeatmapDataPoint,
type PriceTrendPoint,

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common';
import { Prisma, Valuation as PrismaValuation } from '@prisma/client';
import { PrismaService } from '@modules/shared';
import { ValuationEntity, ValuationProps } from '../../domain/entities/valuation.entity';
import { IValuationRepository } from '../../domain/repositories/valuation.repository';
import { type Prisma, type Valuation as PrismaValuation } from '@prisma/client';
import { type PrismaService } from '@modules/shared';
import { ValuationEntity, type ValuationProps } from '../../domain/entities/valuation.entity';
import { type IValuationRepository } from '../../domain/repositories/valuation.repository';
@Injectable()
export class PrismaValuationRepository implements IValuationRepository {

View File

@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
import { LoggerService } from '@modules/shared';
import { type LoggerService } from '@modules/shared';
export interface AiPredictRequest {
area: number;

View File

@@ -1,5 +1,5 @@
import { PropertyType } from '@prisma/client';
import { Comparable } from '../../domain/services/avm-service';
import { type PropertyType } from '@prisma/client';
import { type Comparable } from '../../domain/services/avm-service';
const DEFAULT_RADIUS_METERS = 2000;

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common';
import { CommandBus } from '@nestjs/cqrs';
import { type CommandBus } from '@nestjs/cqrs';
import { Cron, CronExpression } from '@nestjs/schedule';
import { PropertyType } from '@prisma/client';
import { PrismaService, LoggerService } from '@modules/shared';
import { type PrismaService, type LoggerService } from '@modules/shared';
import { UpdateMarketIndexCommand } from '../../application/commands/update-market-index/update-market-index.command';
interface MarketStats {