.jshintrc 与 Gulp, Jhipster
.jshintrc with Gulp, Jhipster
当我想设置"Underscore"时(我以前用'Grunt'),我把.jshintrc.
"globals": {
"_": false,
现在我使用 Jhipster 3.5.1 版 Gulp 但我不知道如何配置它,因为没有文件 .jshintrc。
Ans 它给了我错误
angular.js:13550 ReferenceError: _ is not defined
谁能帮帮我。谢谢。
JHipster 在 this change. Because of this, you should add the globals section to the file .eslintrc.json
the same as it was in .jshintrc
. ()
中用 eslint 替换了 jshint
根据 Angular 的 ReferenceError,您的 index.html 中似乎没有 Underscore 作为依赖项。 运行 bower install underscore --save
下载并安装 Underscore(这会将其添加到 bower.json),然后 运行 gulp inject:dep
自动将依赖项注入 index.html。
当我想设置"Underscore"时(我以前用'Grunt'),我把.jshintrc.
"globals": {
"_": false,
现在我使用 Jhipster 3.5.1 版 Gulp 但我不知道如何配置它,因为没有文件 .jshintrc。 Ans 它给了我错误
angular.js:13550 ReferenceError: _ is not defined
谁能帮帮我。谢谢。
JHipster 在 this change. Because of this, you should add the globals section to the file .eslintrc.json
the same as it was in .jshintrc
. (
根据 Angular 的 ReferenceError,您的 index.html 中似乎没有 Underscore 作为依赖项。 运行 bower install underscore --save
下载并安装 Underscore(这会将其添加到 bower.json),然后 运行 gulp inject:dep
自动将依赖项注入 index.html。