Great tip, can even be automated by Grunt!:
BEFORE javascript jshint: { ignore_warning: { options: { '-W117': true, // ignores ‘require is not defined’ error '-W097': true, // allows non-function form of ‘use strict’ }, src: [‘src/**/*.js’] }, },
javascript jshint: { ignore_warning: { options: { '-W117': true, // ignores ‘require is not defined’ error '-W097': true, // allows non-function form of ‘use strict’ }, src: [‘src/**/*.js’] }, },
AFTER* javascript jshint: { src: ['src/**/*.js'], options: { node: true } // enables error-free use of 'require' and 'use strict' keywords },
javascript jshint: { src: ['src/**/*.js'], options: { node: true } // enables error-free use of 'require' and 'use strict' keywords },
**This implementation is especially great for larger codebases that need to be auto-linted just before being pushed into production.
Thanks!
Great tip, can even be automated by Grunt!:
BEFORE
javascript jshint: { ignore_warning: { options: { '-W117': true, // ignores ‘require is not defined’ error '-W097': true, // allows non-function form of ‘use strict’ }, src: [‘src/**/*.js’] }, },
AFTER*
javascript jshint: { src: ['src/**/*.js'], options: { node: true } // enables error-free use of 'require' and 'use strict' keywords },
**This implementation is especially great for larger codebases that need to be auto-linted just before being pushed into production.
Thanks!