Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev' into product-registered-event
Browse files Browse the repository at this point in the history
  • Loading branch information
EjembiEmmanuel committed Oct 27, 2024
2 parents b0cf654 + 2b710e6 commit a04bdf2
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 44 deletions.
25 changes: 0 additions & 25 deletions backend/.eslintrc.js

This file was deleted.

11 changes: 9 additions & 2 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
11 changes: 11 additions & 0 deletions backend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
89 changes: 83 additions & 6 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "backend",
"version": "0.0.1",
"type": "module",
"description": "",
"author": "",
"private": true,
Expand All @@ -14,7 +15,7 @@
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint:fix": "eslint --fix \"{src,apps,libs,test}/**/*.ts\"",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
Expand All @@ -30,6 +31,8 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
Expand All @@ -39,9 +42,10 @@
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^9.0.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"globals": "^15.11.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
Expand All @@ -50,7 +54,8 @@
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"typescript-eslint": "^8.11.0"
},
"jest": {
"moduleFileExtensions": [
Expand Down
12 changes: 6 additions & 6 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Module } from "@nestjs/common";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { ConfigModule } from "@nestjs/config";
import { ProductsModule } from "./products/products.module";
import { getEnvPath } from "./common/utils/getEnvPath";
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule } from '@nestjs/config';
import { ProductsModule } from './products/products.module';
import { getEnvPath } from './common/utils/getEnvPath';

@Module({
imports: [
Expand Down
2 changes: 1 addition & 1 deletion backend/src/common/utils/getEnvPath.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function getEnvPath() {
//? we might implement some complex env file getting logic here
//? for now we just return the sample env file

return `${process.cwd()}/.env.sample`;
}
2 changes: 1 addition & 1 deletion backend/src/products/products.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { ProductsService } from './products.service';

@Module({
controllers: [ProductsController],
providers: [ProductsService]
providers: [ProductsService],
})
export class ProductsModule {}

0 comments on commit a04bdf2

Please sign in to comment.