Angular框架关闭Tslint语法检查

原文链接:https://blog.csdn.net/weixin_42343931/article/details/105722920

由于Angular版本问题而引起的代码误报,出现问题一般为TSLINT......,这个时候可以使用以下操作解决。

替换tslint.json文件内容

{
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "env": {
    "browser": true,
    "node": true,
    "commonjs": true,
    "meteor": true,
    "mongo": true,
    "jquery": true,
    "amd": true
  },
  "globals": {},
  "rules": {
    "comma-dangle": [2, "never"],
    "no-cond-assign": [2],
    "no-constant-condition": [2],
    "no-control-regex": [2],
    "no-debugger": [2],
    "no-dupe-args": [2],
    "no-dupe-keys": [2],
    "no-duplicate-case": [2],
    "no-empty-character-class": [2],
    "no-empty": [2],
    "no-ex-assign": [2],
    "no-extra-boolean-cast": [2],
    "no-func-assign": [2],
    "no-inner-declarations": [2],
    "no-invalid-regexp": [2],
    "no-irregular-whitespace": [2],
    "no-negated-in-lhs": [2],
    "no-obj-calls": [2],
    "no-regex-spaces": [2],
    "no-sparse-arrays": [2],
    "no-unexpected-multiline": [2],
    "no-unreachable": [2],
    "use-isnan": [2],
    "no-octal": [2],
    "no-empty-pattern": [2],
    "no-multi-spaces": [2],
    "no-unused-labels": [1],
    "no-void": [2],
    "semi": [2, "always"],
    "quotes": [2, "single"],
    "strict": [2, "safe"],
    "dot-location": [2, "property"],
    "no-label-var": [2],
    "no-shadow-restricted-names": [2],
    "no-undef": [2],
    "init-declarations": [2, "always"],
    "no-catch-shadow": [2],
    "no-delete-var": [2],
    "constructor-super": [1],
    "no-const-assign": [2],
    "no-dupe-class-members": [2],
    "no-new-symbol": [2],
    "no-this-before-super": [2],
    "no-class-assign": [2]
  }
}

————————————————
版权声明:本文为CSDN博主「微笑涛声」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_42343931/article/details/105722920

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容