javascript - 如何从 Coffeescript 文件中配置 JSHint?

标签 javascript coffeescript jshint

当使用 Javascript 编程时,可以使用以下语法从 Javascript 文件中配置 JSHint

/* jshint eqnull: true, eqeqeq: false */

是否有任何方法可以从 Coffeescript 文件中设置这些特定配置?

最佳答案

这个 CoffeeScript ...

### jshint eqnull: true, eqeqeq: false ###

alert "regular coffee script here..."

编译为...

/* jshint eqnull: true, eqeqeq: false */alert("regular coffee script here...");

需要它自己的行吗?

### jshint eqnull: true, eqeqeq: false ###
### break after hint ###
alert "regular coffee script here..."

编译为...

/* jshint eqnull: true, eqeqeq: false */
/* break after hint */alert("regular coffee script here...");

关于javascript - 如何从 Coffeescript 文件中配置 JSHint?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15173711/

相关文章:

javascript - 我可以将 div 对象从一个浏览器移动到另一个浏览器吗?

javascript - AngularJS - 将 Youtube 视频 url 从指令嵌入到脚本时出现问题

Javascript - 检查用户是否正在编辑文本输入

angularjs - 如何在没有jshint警告的情况下以 Angular 定义自定义程序包?

javascript - 在全局范围内预定义变量有什么优点?

javascript - JSHint 沉默 "Variable is defined but never used"

javascript - 如何用JS激活我的删除按钮

javascript - 在helper上调用收集数据

javascript - 将对象传递给接受参数列表的函数

javascript - Coffeescript 编译变体(coffeescript.org 与 Coffee-rails)