javascript - JSHint error when running Grunt with QUnit -


i running grunt build jshint , qunit. on first test run following:

running "jshint:files" (jshint) task linting test/libs/qunit-1.11.0.js...error [l661:c22] w069: ['throws'] better written in dot notation. qunit.raises = assert[ "throws" ]; [l1590:c33] w103: '__proto__' property deprecated.       return obj.__proto__;  warning: task "jshint:files" failed. use --force continue.  aborted due warnings. 

besides editing qunit source code , using --force, can this?

to expand upon comment, assuming grunt >0.4 , grunt-contrib-jshint plugin, can select specific files run jshint against. jshint grunt plugin accepts standard glob patterns:

grunt.initconfig({     jshint: {         all: [             'gruntfile.js',             'lib/**/*.js',             'test/**/*.js'         ]     } }); 

that example (from jshint grunt plugin readme) select .js file within lib , test directories (and subdirectories), gruntfile.js file. suggest moving 3rd party libraries out of main lib directory. common convention add vendor directory such scripts.

if 3rd party scripts rely upon available via npm, include them in package.json file, , leave node_modules directory out of grunt config. build process move necessary files right place within app structure.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -