Daniel Kaplan
Daniel Kaplan

Reputation: 67370

Is there a benefit to running JSLint if I've already run CoffeeLint?

Should I use JSLint on my CoffeeScript project when I'm already running CoffeeLint on all the files? I don't think this question is subjective. Here would be objective reasons not to:

  1. Does CoffeeLint already run JSLint? If yes, that would make JSLint redundant
  2. 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
  3. Does CoffeeScript automatically generate code that is JSLinted? That would make running JSLint a waste of time.

Upvotes: 0

Views: 89

Answers (1)

user229044
user229044

Reputation: 239301

No, there is no benefit to running JSLint against JavaScript produced from CoffeeScript.

The output of CoffeeScript's compilation isn't under your control, and it isn't meant to pass any form of linting, so there is absolutely no value to running JSLint against it. You can't fix any problems you find, and there will be a lot of problems.

Linters are for catching human-induced errors in source code, not for finding bugs in transcompilers like CoffeeScript's.

Does CoffeeLint already run JSLint? If yes, that would make JSLint redundant

No

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

This, exactly

Does CoffeeScript automatically generate code that is JSLinted? That would make running JSLint a waste of time.

No

Upvotes: 2

Related Questions