fix: production readiness — resolve build, lint, and code quality issues

- Fix Next.js build failure: remove duplicate route at (dashboard)/listings/[id]
  that conflicted with (public)/listings/[id] (same URL path in two route groups)
- Fix 772 ESLint errors: auto-fix import ordering (import-x/order), remove unused
  imports/variables, convert empty interfaces to type aliases, replace require()
  with ESM imports, fix consistent-type-imports violations
- Add CLAUDE.md for developer onboarding documentation
- All checks pass: 0 lint errors, typecheck clean, 230 tests passing, build success

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 07:15:06 +07:00
parent afa70320f5
commit 2502aa69b7
239 changed files with 746 additions and 984 deletions

View File

@@ -1,9 +1,9 @@
import { describe, it, expect } from 'vitest';
import { PaymentEntity } from '../entities/payment.entity';
import { Money } from '../value-objects/money.vo';
import { PaymentCreatedEvent } from '../events/payment-created.event';
import { PaymentCompletedEvent } from '../events/payment-completed.event';
import { PaymentCreatedEvent } from '../events/payment-created.event';
import { PaymentFailedEvent } from '../events/payment-failed.event';
import { Money } from '../value-objects/money.vo';
describe('PaymentEntity', () => {
const createPayment = (status?: string) => {

View File

@@ -1,13 +1,13 @@
import { AggregateRoot } from '@modules/shared/domain/aggregate-root';
import {
type PaymentProvider,
type PaymentStatus,
type PaymentType,
} from '@prisma/client';
import { type Money } from '../value-objects/money.vo';
import { PaymentCreatedEvent } from '../events/payment-created.event';
import { AggregateRoot } from '@modules/shared/domain/aggregate-root';
import { PaymentCompletedEvent } from '../events/payment-completed.event';
import { PaymentCreatedEvent } from '../events/payment-created.event';
import { PaymentFailedEvent } from '../events/payment-failed.event';
import { type Money } from '../value-objects/money.vo';
export interface PaymentProps {
userId: string;

View File

@@ -1,5 +1,5 @@
import { type DomainEvent } from '@modules/shared/domain/domain-event';
import { type PaymentProvider } from '@prisma/client';
import { type DomainEvent } from '@modules/shared/domain/domain-event';
export class PaymentCompletedEvent implements DomainEvent {
readonly eventName = 'payment.completed';

View File

@@ -1,5 +1,5 @@
import { type DomainEvent } from '@modules/shared/domain/domain-event';
import { type PaymentProvider, type PaymentType } from '@prisma/client';
import { type DomainEvent } from '@modules/shared/domain/domain-event';
export class PaymentCreatedEvent implements DomainEvent {
readonly eventName = 'payment.created';

View File

@@ -1,5 +1,5 @@
import { type DomainEvent } from '@modules/shared/domain/domain-event';
import { type PaymentProvider } from '@prisma/client';
import { type DomainEvent } from '@modules/shared/domain/domain-event';
export class PaymentFailedEvent implements DomainEvent {
readonly eventName = 'payment.failed';

View File

@@ -1,5 +1,5 @@
import { type PaymentEntity } from '../entities/payment.entity';
import { type PaymentStatus } from '@prisma/client';
import { type PaymentEntity } from '../entities/payment.entity';
export const PAYMENT_REPOSITORY = Symbol('PAYMENT_REPOSITORY');

View File

@@ -1,5 +1,5 @@
import { ValueObject } from '@modules/shared/domain/value-object';
import { Result } from '@modules/shared/domain/result';
import { ValueObject } from '@modules/shared/domain/value-object';
interface MoneyProps {
amountVND: bigint;