forked from highcharts/highcharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
65 lines (59 loc) · 2.77 KB
/
gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*global module */
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-jslint'); // load the task
grunt.initConfig({
jslint: { // configure the task
// lint your project's server code
server: {
src: [
'samples/*/*/*/demo.js'
],
exclude: [
'samples/issues/*/*/demo.js',
'samples/*/issues/*/demo.js',
'samples/*/studies/*/demo.js',
'samples/maps/demo/us-counties/demo.js', // All but the data variable is linted. --CONTINUE TO IGNORE
'samples/maps/demo/us-data-labels/demo.js', // Dangling underscore!
'samples/maps/demo/rich-info/demo.js', // Ignore it, too much needs to be changed. --CONTINUE TO IGNORE
'samples/highcharts/members/series-update/demo.js', // Object and references goes to horribly wrongler while eaching and clicking.. "Unused 'i'"
'samples/highcharts/demo/heatmap-canvas/demo.js', // Decent amount of funky --CONTINUE TO IGNORE
'samples/highcharts/demo/gauge-clock/demo.js', // Did not lint the jquery copypaste --CONTINUE TO IGNORE
'samples/highcharts/demo/combo-meteogram/demo.js' // Do not want to ruin anything. Lint does not like "while(i--)" --CONTINUE TO IGNORE
],
directives: { // example directives
sloppy: true,
todo: true,
predef: [
'$',
'window',
'Highcharts',
'document',
'usdeur',
'alert',
'setTimeout',
'ADBE',
'MSFT',
'temperatures',
'ohlcdata',
'setInterval',
'GOOGL',
'location',
'clearTimeout',
'confirm',
'hs',
'moment'
]
},
options: {
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
errorsOnly: true, // only display errors
failOnError: false // defaults to true
}
}
}
});
grunt.registerTask('lint-samples', 'jslint');
// load other tasks in current directory
grunt.loadTasks('./grunt-tasks');
};