javascript - How to tell JSLint / JSHint what global variables are already defined -
in project have global variables work containers:
myproject.myfreature.somefunction = function() { ... } so use script across site , jslint / jshint complains that:
'myproject' not defined
i know can go every javascript file , add comment /*global myproject*/ on top of it. i'm looking way define comment in sort of config file don't have go file file adding comment.
some kind on option in config/jshint.yml nice.
for jshint can create .jshintrc project directory with
{ "globals": { "myproject": true } }
Comments
Post a Comment