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:
@@ -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';
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
|
||||
export class LeadCreatedEvent implements DomainEvent {
|
||||
readonly eventName = 'lead.created';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user