Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 57 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /*jshint node:true */ |
||
2 | module.exports = function ( grunt ) { |
||
3 | |||
4 | 'use strict'; |
||
5 | |||
6 | grunt.loadNpmTasks( 'grunt-contrib-jshint' ); |
||
7 | grunt.loadNpmTasks( 'grunt-jsonlint' ); |
||
8 | grunt.loadNpmTasks( 'grunt-banana-checker' ); |
||
9 | |||
10 | grunt.initConfig( { |
||
11 | jshint: { |
||
12 | options: { |
||
13 | // Enforcing |
||
14 | "bitwise": true, |
||
15 | "curly": true, |
||
16 | "eqeqeq": true, |
||
17 | "freeze": true, |
||
18 | "latedef": "nofunc", |
||
19 | "noarg": true, |
||
20 | "nonew": true, |
||
21 | "undef": true, |
||
22 | "unused": true, |
||
23 | "strict": true, |
||
24 | |||
25 | // ECMAScript version |
||
26 | "esversion": 3, |
||
27 | |||
28 | // Environment |
||
29 | "browser": true, |
||
30 | "jquery": true, |
||
31 | |||
32 | // map of global variables, with keys as names and a boolean value to determine if they are assignable |
||
33 | "globals": { |
||
34 | "mediaWiki": false |
||
35 | }, |
||
36 | |||
37 | "ignores": [] |
||
38 | }, |
||
39 | all: [ |
||
40 | '**/*.js', |
||
41 | '!node_modules/**' |
||
42 | ] |
||
43 | }, |
||
44 | banana: { |
||
45 | all: 'i18n/' |
||
46 | }, |
||
47 | jsonlint: { |
||
48 | all: [ |
||
49 | '**/*.json', |
||
50 | '!node_modules/**' |
||
51 | ] |
||
52 | } |
||
53 | } ); |
||
54 | |||
55 | grunt.registerTask( 'lint', [ 'jshint', 'jsonlint', 'banana' ] ); |
||
56 | grunt.registerTask( 'test', [ 'lint' ] ); |
||
57 | grunt.registerTask( 'default', 'test' ); |
||
58 | }; |
||
59 |