前端开发

tslint配置

2019-04-28  本文已影响2人  小程序前端超市

tslint官网:https://palantir.github.io/tslint/

常用配置

{
  "defaultSeverity": "warning",
  "extends": [
    "tslint:recommended"
  ],
  "linterOptions": {
    "exclude": [
      "node_modules/**"
    ]
  },
  "rules": {
    "no-console": false, // 关闭console告警
    "quotemark": [true, "single"],
    "indent": [true, "spaces", 2],
    "interface-name": false,
    "ordered-imports": false,
    "object-literal-sort-keys": false,
    "no-consecutive-blank-lines": false,
    "no-trailing-whitespace": true // 关闭trailing whitespace告警
  }
}
上一篇 下一篇

猜你喜欢

热点阅读