"Use the function form of "在使用 Gulp + Babel + JsHint 时使用 strict"
"Use the function form of "use strict" when using Gulp + Babel + JsHint
我收到此警告:
"Use the function form of "use strict"
当 gulp 看我的 js 文件。
如何解决?
我正在使用 gulp、gulp-babel 和 gulp-jshint。
代码示例:
.pipe( babel() )
.pipe( jshint( ".jshintrc" ) )
我没有在我的代码中写 'use strict'
。它是由 babel 生成的。
重申 Bergi 在评论中所说的内容,您不应该检查不是您编写的代码。你应该切换顺序和 运行 jshint before using babel.
我收到此警告:
"Use the function form of "use strict"
当 gulp 看我的 js 文件。
如何解决? 我正在使用 gulp、gulp-babel 和 gulp-jshint。
代码示例:
.pipe( babel() )
.pipe( jshint( ".jshintrc" ) )
我没有在我的代码中写 'use strict'
。它是由 babel 生成的。
重申 Bergi 在评论中所说的内容,您不应该检查不是您编写的代码。你应该切换顺序和 运行 jshint before using babel.