【发布时间】:2014-03-27 07:56:02
【问题描述】:
我使用 angular-generator 使用 Grunt 创建了一个新服务,然后使用 WebStorm Ctrl+ALT+L kbd> 因为制表符/空格似乎有所不同。
然后当使用 Grunt 并且任务 JSHint 抱怨我得到以下错误:
app/scripts/services/poteservice.js
line 11 col 13 Expected '}' to have an indentation at 15 instead at 13.
line 14 col 13 Expected '}' to have an indentation at 15 instead at 13.
另一个奇怪的问题是我发现我可以在 WebStorm 中启用 JSHint,但随后我遇到了类似的问题
JSHINT: angular not defined
and
Use the function form of use strict
任何人都知道如何让每个人都很好地一起玩,例如 WebStorm 和 Grunt 等。
我确实安装了 Angular 的 WebStorm 插件。
谁能帮忙?
【问题讨论】:
-
您必须确保缩进在 webstorm 和 .jshintrc 文件中设置为相同的值
标签: javascript angularjs gruntjs webstorm jshint