【发布时间】:2019-03-10 19:22:34
【问题描述】:
我在我的 vuejs/typescript 项目上运行 vue-cli-service lint --fix。像预期的那样,大多数 linting 错误/警告都会自动修复。
但是有特定的 tslint 规则("semicolon": [true, "always", "ignore-interfaces"])我想用这个命令自动修复。假设我的打字稿界面看起来像这样(预期的 lint 结果)。
interface component {
type: "input" | "dropdown" | "checkbox",
hidden?: boolean
}
运行 lint 后,它会像这样格式化它。留言是[eslint] Replace,with;(prettier/prettier)
interface component {
type: "input" | "dropdown" | "checkbox";
hidden?: boolean;
}
我已将这条规则"semicolon": [true, "always", "ignore-interfaces"] 添加到 tslint 文件中,但它不会改变结果。
【问题讨论】:
标签: typescript vue.js vuejs2 tslint