我应该使用 JSLint当我已经运行时在我的 CoffeeScript 项目上 CoffeeLint在所有文件上?我不认为这个问题是主观的。以下是不这样做的客观原因:
- CoffeeLint 是否已运行 JSLint?如果是,那么 JSLint 就会变得多余
- CoffeeScript 生成的代码是否会导致 JSLint 以我无法控制的方式失败?如果是的话,JSLint 只会妨碍我
- CoffeeScript 是否自动生成 JSLinted 代码?这会使运行 JSLint 成为浪费时间。
最佳答案
不,针对由 CoffeeScript 生成的 JavaScript 运行 JSLint 没有任何好处。
CoffeeScript 编译的输出不受您的控制,并且它并不意味着传递任何形式的 linting,因此针对它运行 JSLint 绝对没有任何值(value)。您无法解决发现的任何问题,并且将会出现很多问题。
Linter 用于捕获源代码中人为引起的错误,而不是用于查找 CoffeeScript 等转译器中的错误。
Does CoffeeLint already run JSLint? If yes, that would make JSLint redundant
没有
Does CoffeeScript generate code that will make JSLint fail in ways that I have no control over? If yes, JSLint will just get in my way
正是这个
Does CoffeeScript automatically generate code that is JSLinted? That would make running JSLint a waste of time.
没有
关于javascript - 如果我已经运行了 CoffeeLint,那么运行 JSLint 有什么好处吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23141091/