【发布时间】:2014-10-08 15:26:04
【问题描述】:
我将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
}
}
【问题讨论】:
-
您能否发布您的 Gruntfile(或尽可能少地复制问题)以便我们帮助解决问题?
-
是的...让我更新...
标签: gruntjs jshint grunt-contrib-jshint