-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f30d6f0
commit 0c57d0f
Showing
13 changed files
with
5,849 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'@typescript-eslint/eslint-plugin', | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript" | ||
], | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
// General formatting rules | ||
"eol-last": ["error", "always"], | ||
"indent": ["error", 4], | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "never"], | ||
|
||
// Code style and structure rules | ||
"arrow-parens": ["error", "always"], | ||
"arrow-spacing": ["error", { "before": true, "after": true }], | ||
"comma-dangle": ["error", "never"], | ||
"curly": ["error", "all"], | ||
"func-style": ["error", "expression"], | ||
"no-shadow": "warn", | ||
"no-useless-concat": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"space-before-blocks": ["error", "always"], | ||
|
||
// Import and export rules | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
["builtin", "external"], | ||
"internal" | ||
], | ||
"newlines-between": "always" | ||
} | ||
], | ||
"import/no-unresolved": "off", | ||
|
||
// TypeScript-specific rules | ||
"@typescript-eslint/array-type": ["error", { "default": "generic" }], | ||
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }], | ||
"@typescript-eslint/explicit-module-boundary-types": "error", | ||
|
||
// Variable and async handling rules | ||
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }], | ||
"prefer-const": "error", | ||
"require-await": "error", | ||
|
||
// Debugging and logging rules | ||
"no-console": "error", | ||
"no-debugger": "error", | ||
|
||
// NestJS | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"compilerOptions": { | ||
"deleteOutDir": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"name": "workspace-interaction-hub", | ||
"version": "0.0.1", | ||
"description": "", | ||
"author": "", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "nest build", | ||
"start": "nest start", | ||
"start:dev": "nest start --watch", | ||
"start:prod": "node dist/main", | ||
"start:debug": "nest start --debug --watch", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", | ||
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||
"test": "jest --passWithNoTests", | ||
"test:cov": "jest --coverage", | ||
"test:e2e": "jest --config ./test/jest-e2e.json", | ||
"test:watch": "jest --watch", | ||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand" | ||
}, | ||
"dependencies": { | ||
"@nestjs/common": "^10.0.0", | ||
"@nestjs/core": "^10.0.0", | ||
"@nestjs/platform-express": "^10.0.0", | ||
"reflect-metadata": "^0.2.0", | ||
"rxjs": "^7.8.1" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/cli": "^10.0.0", | ||
"@nestjs/schematics": "^10.0.0", | ||
"@nestjs/testing": "^10.0.0", | ||
"@types/express": "^5.0.0", | ||
"@types/jest": "^29.5.2", | ||
"@types/node": "^22.10.2", | ||
"@types/supertest": "^6.0.2", | ||
"@typescript-eslint/eslint-plugin": "^8.0.0", | ||
"@typescript-eslint/parser": "^8.0.0", | ||
"eslint": "^8.0.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"jest": "^29.5.0", | ||
"source-map-support": "^0.5.21", | ||
"supertest": "^7.0.0", | ||
"ts-jest": "^29.1.0", | ||
"ts-loader": "^9.4.3", | ||
"ts-node": "^10.9.1", | ||
"tsconfig-paths": "^4.2.0", | ||
"typescript": "^5.1.3" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": [ | ||
"**/*.(t|j)s" | ||
], | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Module } from '@nestjs/common' | ||
|
||
@Module({ | ||
imports: [] | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as process from 'node:process' | ||
import { NestFactory } from '@nestjs/core' | ||
|
||
import { AppModule } from './app.module' | ||
|
||
(async () => { | ||
const app = await NestFactory.create(AppModule) | ||
|
||
await app.listen(process.env.PORT ?? 3000) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Test, TestingModule } from '@nestjs/testing' | ||
import { INestApplication } from '@nestjs/common' | ||
import * as request from 'supertest' | ||
|
||
import { AppModule } from '../src/app.module' | ||
|
||
describe('[e2e] AppModule', () => { | ||
let app: INestApplication | ||
|
||
beforeEach(async () => { | ||
const moduleFixture: TestingModule = await Test.createTestingModule({ | ||
imports: [AppModule] | ||
}).compile() | ||
|
||
app = moduleFixture.createNestApplication() | ||
await app.init() | ||
}) | ||
|
||
describe('AppController', | ||
() => { | ||
it('GET /', | ||
() => { | ||
return request(app.getHttpServer()) | ||
.get('/') | ||
.expect(404) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"moduleFileExtensions": ["js", "json", "ts"], | ||
"rootDir": ".", | ||
"testEnvironment": "node", | ||
"testRegex": ".e2e-spec.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"declaration": true, | ||
"removeComments": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"target": "ES2021", | ||
"sourceMap": true, | ||
"outDir": "./dist", | ||
"baseUrl": "./", | ||
"incremental": true, | ||
"skipLibCheck": true, | ||
"strictNullChecks": false, | ||
"noImplicitAny": false, | ||
"strictBindCallApply": false, | ||
"forceConsistentCasingInFileNames": false, | ||
"noFallthroughCasesInSwitch": false | ||
} | ||
} |
Oops, something went wrong.