如何抑制“{variable}更好用点式表示法编写。” [英] How to suppress "{variable} is better written in dot notation."

查看:163
本文介绍了如何抑制“{variable}更好用点式表示法编写。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有选项和/或如何抑制如下错误?

Is there an option to and/or how do I suppress errors like the following?


175,14:['tracker'最好用点符号写。

175,14:['tracker'] is better written in dot notation.


推荐答案

如果它是一个功能而不是一个bug,把它放在你文件的顶部。

If it's a feature and not a bug, place this at the top of your file.

/*jshint sub:true*/

如果这是一个错误,你应该重构你的代码

If it's a bug, you should refactor your code

foo['tracker'] = bar // from this...
foo.tracker = bar;   // to this!

关于原因的好帖子:https://stackoverflow.com/a/2001410/94668

这篇关于如何抑制“{variable}更好用点式表示法编写。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆