gpt4 book ai didi

typescript - TSLint 与 VS code 格式文档的冲突

转载 作者:行者123 更新时间:2023-12-05 05:08:18 29 4
gpt4 key购买 nike

你能告诉我如何解决这个 TSLint 和 VS 代码格式文档问题吗?即 TsLint 格式化规则和 VS 代码文档格式做两件事。

这是关于该冲突的 Youtube 视频:https://youtu.be/1MoUX8BdO9E

enter image description here

tslint.json

{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
200
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"one-variable-per-declaration": false,
"component-class-suffix": [
true,
"Page",
"Component"
],
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"page",
"kebab-case"
]
}
}

最佳答案

我能够像这样解决这个问题:也就是说,你可以看到所有的新行。

constructor(
private router: Router,
private modalController: ModalController,
public detectBackendService: DetectBackendService,
private formBuilder: FormBuilder,
public departmentsDataService: DepartmentsDataService,

) { }

关于typescript - TSLint 与 VS code 格式文档的冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58466184/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com