这是我的package.json文件:

{
  "name": "mmorpg_server",
  "version": "1.0.0",
  "description": "NodeJS Server using TypeScript and ES6",
  "main": "src/server.ts",
  "scripts": {
    "start": "cd src/ && node server.js",
    "dev": "concurrently -k -n \"Tslint, Typescript, Node\" -p \"[{name}]\" -c \"purple, blue, green\" \"npm run lint\" \"tsc --watch\" \"nodemon -L dist/index.js\"",
    "lint": "./node_modules/.bin/tslint ./src/*"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/express": "^4.16.0",
    "@types/node": "^10.12.5",
    "chokidar": "^2.0.4",
    "concurrently": "^4.0.1",
    "tslint": "^5.11.0",
    "typescript": "^3.1.6",
    "webpack": "^4.25.1",
    "webpack-cli": "^3.1.2"
  },
  "dependencies": {
    "express": "^4.16.4",
    "http": "^0.0.0"
  }
}

我从lint npm脚本启动tslint命令 . 启动dev脚本时,我看到tslint正确输出了linting错误 . 但它不是仅传递给下一个并发脚本,而是退出并将SIGTERM传递给其他脚本,从而阻止它们启动 .

Log of launch script

我在TSlint文档中看到我们可以在tslint中使用 defaultSeverity 选项 . 但它并没有这样使用 .

我怎样才能确保TSlint只输出错误并且在linting之后不会立即退出以便我的其他脚本可以跟随?