~/.jshintrc中配置了indent为4
{..., "indent":4, "white":false, ...}
然后在比如这个测试代码test.js
/jshint indent:4/
var condition, doSth;
if (condition)
doSth(); // expected to be invalid
jshint test.js 并没有检查缩进。
同样的代码 使用jslint --indent 4 test.js 可以检查出来缩进问题。
大家jshint缩进是怎么配置的?
{..., "indent":4, "white":false, ...}
然后在比如这个测试代码test.js
/jshint indent:4/
var condition, doSth;
if (condition)
doSth(); // expected to be invalid
jshint test.js 并没有检查缩进。
同样的代码 使用jslint --indent 4 test.js 可以检查出来缩进问题。
大家jshint缩进是怎么配置的?
