简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM