Ozrix
Ozrix

Reputation: 3515

Can JSHint output warnings about globals

Is there an option parameter to force JSHint to check for explicitly defined global variables and output a warning?

clarification: http://jsbin.com/odUcabUL/6/watch?js

Upvotes: 0

Views: 111

Answers (1)

Ben
Ben

Reputation: 10156

You might want to have a look at ESLint, which is a completely pluggable alternative to JSHint. Has a lot of rules already and if you can't find what you're looking for in there you can always write your own rule. There's a grunt task available too.

  1. https://github.com/sindresorhus/grunt-eslint
  2. https://github.com/nzakas/eslint

Upvotes: 1

Related Questions