@@ -17,9 +17,11 @@ module.exports = function(grunt) {
1717 'src/js/tooltips.js' ,
1818 'src/js/aria.js' ,
1919 'src/js/pips.js' ,
20- 'src/js/scope_helpers.js' ,
2120 'src/js/scope_events.js' ,
22- 'src/js/scope.js' ,
21+ 'src/js/scope_event_binding.js' ,
22+ 'src/js/scope_core.js' ,
23+ 'src/js/scope_api.js' ,
24+ 'src/js/scope_run.js' ,
2325 'src/js/scope_end.js' ,
2426 'src/js/interface.js' ,
2527 'src/js/outro.js'
@@ -78,10 +80,35 @@ module.exports = function(grunt) {
7880 latedef : true ,
7981 undef : true ,
8082 unused : true ,
83+ shadow : "outer" ,
84+ eqeqeq : true ,
85+ forin : true ,
86+ freeze : true ,
8187 globals : { module : true , define : true , __dirname : true , require : true }
8288 } ,
8389 basic : [ 'distribute/nouislider.js' ]
8490 } ,
91+ eslint : {
92+ options : {
93+ configFile : 'eslint.json'
94+ } ,
95+
96+ // Only lint files containing solely function definitions
97+ target : [
98+ 'src/js/helpers.js' ,
99+ 'src/js/constants.js' ,
100+ 'src/js/range.js' ,
101+ 'src/js/options.js' ,
102+ 'src/js/structure.js' ,
103+ 'src/js/tooltips.js' ,
104+ 'src/js/aria.js' ,
105+ 'src/js/pips.js' ,
106+ 'src/js/scope_events.js' ,
107+ 'src/js/scope_event_binding.js' ,
108+ 'src/js/scope_core.js' ,
109+ 'src/js/scope_api.js'
110+ ]
111+ } ,
85112 uglify : {
86113 all : {
87114 options : {
@@ -131,6 +158,9 @@ module.exports = function(grunt) {
131158 // https://github.com/gruntjs/grunt-contrib-qunit
132159 grunt . loadNpmTasks ( 'grunt-contrib-qunit' ) ;
133160
161+ // https://www.npmjs.com/package/grunt-eslint
162+ grunt . loadNpmTasks ( 'grunt-eslint' ) ;
163+
134164 grunt . registerTask ( 'default' , [ 'concat' , 'less' , 'jshint' ] ) ;
135165 grunt . registerTask ( 'test' , [ 'concat' , 'less' , 'jshint' , 'qunit' ] ) ;
136166 grunt . registerTask ( 'create' , [ 'concat' , 'less' , 'uglify' , 'cssmin' ] ) ;
0 commit comments