feature: add tslint script, add tsconfig.spec

This commit is contained in:
Kamil Myśliwiec 2018-04-22 12:42:34 +02:00
parent 5717281847
commit cd4b5f89b4
4 changed files with 10 additions and 4 deletions

View File

@ -19,7 +19,6 @@
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> <a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> <a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a> <a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
<img src="https://img.shields.io/badge/👌-Production Ready-78c7ff.svg"/>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> <a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p> </p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer) <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)

View File

@ -4,12 +4,13 @@
"description": "Nest TypeScript starter repository", "description": "Nest TypeScript starter repository",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"format": "prettier --write \"**/*.ts\"", "format": "prettier --write \"src/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts", "start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon", "start:dev": "nodemon",
"prestart:prod": "rm -rf dist && tsc", "prestart:prod": "rm -rf dist && tsc",
"start:prod": "node dist/main.js", "start:prod": "node dist/main.js",
"start:hmr": "node dist/server", "start:hmr": "node dist/server",
"lint": "tslint -p tsconfig.json -c tslint.json",
"test": "jest", "test": "jest",
"test:cov": "jest --coverage", "test:cov": "jest --coverage",
"test:e2e": "jest --config ./test/jest-e2e.json", "test:e2e": "jest --config ./test/jest-e2e.json",

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
"declaration": false, "declaration": true,
"noImplicitAny": false, "noImplicitAny": false,
"removeComments": true, "removeComments": true,
"noLib": false, "noLib": false,
@ -10,7 +10,6 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"target": "es6", "target": "es6",
"sourceMap": true, "sourceMap": true,
"allowJs": true,
"outDir": "./dist", "outDir": "./dist",
"baseUrl": "./src" "baseUrl": "./src"
}, },

7
tsconfig.spec.json Normal file
View File

@ -0,0 +1,7 @@
{
"extends": "tsconfig.json",
"compilerOptions": {
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.d.ts"]
}