npm - 禁用 npm "Warning - tslint: error no-string-literal: object access via string literals is disallowed"

标签 npm warnings

如何禁用 npm 警告“tslint:错误 no-string-literal:不允许通过字符串进行对象访问”我尝试在 tslint.json 中添加规则“no-string-literal”:false。我仍然看到警告。

最佳答案

在 tslint 配置文件中的 rules 下,将 "no-string-literal" 设置为 false,使其变为:"no-string-literal": false

https://palantir.github.io/tslint/rules/no-string-literal/

关于npm - 禁用 npm "Warning - tslint: error no-string-literal: object access via string literals is disallowed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53489179/

相关文章:

javascript - 插件 gulp-babel : Plugin/Preset files are not allowed to export objects, 中的错误仅起作用

javascript - react native : Can't import and use external packages

c++ - 我如何从 g++ 中获取缺少原型(prototype)的警告?

iPhone 开发 - 编译器警告!

maven-2 - 出现 "CHECKSUM FAILED"警告时如何让 Maven 部署失败

c - 如何解决 "control reaches end of non-void function"警告?

javascript - 我如何在 JavaScript 依赖框架之间进行选择?

node.js - 在 express 中 res.send 和 res.write 有什么区别?

javascript - Angular 2 - 如何传递 URL 参数?

ios - 如何禁用 Xcode 警告 "Enable Base Internationalization"?