我收到了这个警告:
"Use the function form of "use strict"
当使用gulp监控我的js文件时。
如何解决? 我正在使用gulp、gulp-babel和gulp-jshint。
代码示例:
.pipe( babel() )
.pipe( jshint( ".jshintrc" ) )
我没有在我的代码中写上'use strict'
。它是由Babel生成的。
babel()
之前将其管道化。你应该对你的ES6代码进行lint,而不是一些转译器生成的东西。 - Bergi