首页 > 解决方案 > VS 代码在每个空格上添加了无用的单词“cons”单词和分号

问题描述

我在 tslint 中添加了一些新规则,但之后我开始收到这些错误,其中 vs 代码在空格上添加“cons”字和分号,并且还用 cons 替换等待中的 wa 或用 cons 作为回报。我不确定为什么会这样。
我尝试从用户设置中的用户设置更改设置还在 tslint 中添加了 "no-trailing-whitespace": false 和 "semicolon": [false, "always"] 规则,但它没有帮助。我还添加了截图的代码。任何帮助将非常感激在此处输入图像描述

下面是我的 tslint 文件

{
  "extends": [
    "tslint-no-circular-imports",
    "tslint-eslint-rules",
    "tslint-config-prettier",
    "tslint-plugin-prettier",
    "tslint:latest"
  ],

  "rules": {
    "no-console": [true, "error"],
    "object-literal-sort-keys": false,
    "quotemark": [false, "avoid-escape"],
    "semicolon": [false, "always"],
    "indent": [true, "spaces", 4],
    "no-var-keyword": true,
    "no-default-export": true,
    "trailing-comma": [false],
    "object-literal-key-quotes": false,
    "arrow-parens": false,
    "space-before-function-paren": false,
    "no-unused-variable": true,
    "no-return-await": true,
    "no-duplicate-imports": true,
    "match-default-export-name": true,
    "max-line-length": false,
    "no-implicit-dependencies": false,
    "no-submodule-imports": false,
    "no-var-requires": false,
    "member-ordering": false,
    "ordered-imports": false,
    "only-arrow-functions": false,
    "no-trailing-whitespace": false,
    "triple-equals": false
  },
  "rulesDirectory": ["node_modules/tslint-eslint-rules/dist/rules"]
}

标签: typescriptvisual-studio-codeprotractortslint

解决方案


推荐阅读