Skip to content

Commit

Permalink
feature: compatibility with various IDEs
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Dec 7, 2018
1 parent 1bbfc97 commit 1b81bde
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 64 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -4,7 +4,7 @@
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write \"src/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon",
Expand All @@ -23,14 +23,14 @@
"@nestjs/microservices": "^5.4.0",
"@nestjs/testing": "^5.4.0",
"@nestjs/websockets": "^5.4.0",
"@types/node": "^10.7.1",
"reflect-metadata": "^0.1.12",
"rimraf": "^2.6.2",
"rxjs": "^6.2.2"
},
"devDependencies": {
"@types/express": "^4.16.0",
"@types/jest": "^23.3.1",
"@types/node": "^10.7.1",
"@types/supertest": "^2.0.5",
"jest": "^23.5.0",
"nodemon": "^1.18.3",
Expand Down
5 changes: 2 additions & 3 deletions src/app.controller.spec.ts
@@ -1,5 +1,4 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';

Expand All @@ -13,10 +12,10 @@ describe('AppController', () => {
}).compile();
});

describe('root', () => {
describe('getHello', () => {
it('should return "Hello World!"', () => {
const appController = app.get<AppController>(AppController);
expect(appController.root()).toBe('Hello World!');
expect(appController.getHello()).toBe('Hello World!');
});
});
});
4 changes: 2 additions & 2 deletions src/app.controller.ts
Expand Up @@ -6,7 +6,7 @@ export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
root(): string {
return this.appService.root();
getHello(): string {
return this.appService.getHello();
}
}
2 changes: 1 addition & 1 deletion src/app.service.ts
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
root(): string {
getHello(): string {
return 'Hello World!';
}
}
5 changes: 5 additions & 0 deletions tsconfig.build.json
@@ -0,0 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
}
3 changes: 1 addition & 2 deletions tsconfig.json
Expand Up @@ -13,6 +13,5 @@
"outDir": "./dist",
"baseUrl": "./"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion tsconfig.spec.json
@@ -1,5 +1,5 @@
{
"extends": "tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["jest", "node"]
},
Expand Down
69 changes: 16 additions & 53 deletions tslint.json
@@ -1,55 +1,18 @@
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {
"no-unused-expression": true
},
"rules": {
"eofline": false,
"quotemark": [
true,
"single"
],
"indent": false,
"member-access": [
false
],
"ordered-imports": [
false
],
"max-line-length": [
true,
150
],
"member-ordering": [
false
],
"curly": false,
"interface-name": [
false
],
"array-type": [
false
],
"no-empty-interface": false,
"no-empty": false,
"arrow-parens": false,
"object-literal-sort-keys": false,
"no-unused-expression": false,
"max-classes-per-file": [
false
],
"variable-name": [
false
],
"one-line": [
false
],
"one-variable-per-declaration": [
false
]
},
"rulesDirectory": []
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {
"no-unused-expression": true
},
"rules": {
"quotemark": [true, "single"],
"member-access": [false],
"ordered-imports": [false],
"max-line-length": [true, 150],
"member-ordering": [false],
"interface-name": [false],
"arrow-parens": false,
"object-literal-sort-keys": false
},
"rulesDirectory": []
}

0 comments on commit 1b81bde

Please sign in to comment.