我indent
设置为 4。如果我删除源文件中的所有缩进,JSHint 不会因此而失败。它会检查除缩进之外的所有内容。我如何得到它来检查缩进?
另外,我已经安装了jshint-eclipse插件,它也不起作用!
这是我的 GruntFile 的摘录:
// Make sure code styles are up to par and there are no obvious mistakes
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: {
src: [
'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js'
]
},
test: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/spec/{,*/}*.js']
}
},
还有我的 jshint:
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": false,
"globals": {
"angular": false
}
}