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:
@@ -8,6 +8,7 @@ import './instrument';
|
||||
|
||||
import { RequestMethod, ValidationPipe } from '@nestjs/common';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { IoAdapter } from '@nestjs/platform-socket.io';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import helmet from 'helmet';
|
||||
@@ -58,6 +59,9 @@ async function bootstrap() {
|
||||
jsonDocumentUrl: 'api/v1/docs-json',
|
||||
});
|
||||
|
||||
// ── WebSocket Adapter (Socket.IO) ──
|
||||
app.useWebSocketAdapter(new IoAdapter(app));
|
||||
|
||||
// ── Security Headers (Helmet) ──
|
||||
app.use(
|
||||
helmet({
|
||||
@@ -68,7 +72,7 @@ async function bootstrap() {
|
||||
scriptSrc: ["'self'", "'unsafe-inline'", 'https://cdn.jsdelivr.net'],
|
||||
styleSrc: ["'self'", "'unsafe-inline'", 'https://cdn.jsdelivr.net'],
|
||||
imgSrc: ["'self'", 'data:', 'https:', 'blob:'],
|
||||
connectSrc: ["'self'", 'https://cdn.jsdelivr.net', 'https://api.goodgo.vn'],
|
||||
connectSrc: ["'self'", 'https://cdn.jsdelivr.net', 'https://api.goodgo.vn', 'wss:', 'ws:'],
|
||||
fontSrc: ["'self'", 'data:'],
|
||||
objectSrc: ["'none'"],
|
||||
frameSrc: ["'none'"],
|
||||
|
||||
Reference in New Issue
Block a user