chore: prettier

This commit is contained in:
arswarog committed 2026-11-13 19:16:45 +03:00
1 parent cac80fe476
commit 0b7c76b290
7 files changed
+52 -31

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
dist
coverage
*.d.ts
node_modules
.obsidian
.idea
logs
report
+15 -2
View File
@@ -1,4 +1,17 @@
{ {
"singleQuote": true, "printWidth": 100,
"trailingComma": "all" "useTabs": false,
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"overrides": [
{
"files": ["*.json"],
"options": {
"printWidth": 10
}
}
]
} }
+7 -7
View File
@@ -6,13 +6,13 @@
"private": true, "private": true,
"license": "UNLICENSED", "license": "UNLICENSED",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "nest build", "build": "nest build",
"deploy": "nest deploy", "deploy": "nest deploy",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\"",
"start": "nest start", "start": "nest start",
"start:dev": "nest start --watch", "start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch", "start:debug": "nest start --debug --watch",
"start:prod": "node dist/main", "start:prod": "node dist/main",
"lint": "oxlint --type-aware src/ test/", "lint": "oxlint --type-aware src/ test/",
"test": "vitest run", "test": "vitest run",
+12 -12
View File
@@ -3,20 +3,20 @@ import { AppController } from './app.controller';
import { AppService } from './app.service'; import { AppService } from './app.service';
describe('AppController', () => { describe('AppController', () => {
let appController: AppController; let appController: AppController;
beforeEach(async () => { beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({ const app: TestingModule = await Test.createTestingModule({
controllers: [AppController], controllers: [AppController],
providers: [AppService], providers: [AppService],
}).compile(); }).compile();
appController = app.get<AppController>(AppController); appController = app.get<AppController>(AppController);
}); });
describe('root', () => { describe('root', () => {
it('should return "Hello World!"', () => { it('should return "Hello World!"', () => {
expect(appController.getHello()).toBe('Hello World!'); expect(appController.getHello()).toBe('Hello World!');
});
}); });
});
}); });
+5 -5
View File
@@ -3,10 +3,10 @@ import { AppService } from './app.service.js';
@Controller() @Controller()
export class AppController { export class AppController {
constructor(private readonly appService: AppService) {} constructor(private readonly appService: AppService) {}
@Get() @Get()
getHello(): string { getHello(): string {
return this.appService.getHello(); return this.appService.getHello();
} }
} }
+3 -3
View File
@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
@Injectable() @Injectable()
export class AppService { export class AppService {
getHello(): string { getHello(): string {
return 'Hello World!'; return 'Hello World!';
} }
} }
+2 -2
View File
@@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module.js'; import { AppModule } from './app.module.js';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
await app.listen(process.env.PORT ?? 3000); await app.listen(process.env.PORT ?? 3000);
} }
await bootstrap(); await bootstrap();