Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 4314b46

Browse files
committed
move jshint config to jshintrc file and start refactor for eslint
1 parent 324fd78 commit 4314b46

File tree

2 files changed

+70
-54
lines changed

2 files changed

+70
-54
lines changed

.jshintrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"curly": true,
3+
"devel": true,
4+
"eqeqeq": true,
5+
"forin": true,
6+
"funcscope": true,
7+
"latedef": "nofunc",
8+
"laxbreak": true,
9+
"loopfunc": true,
10+
"maxdepth": 3,
11+
"noarg": true,
12+
"nonbsp": true,
13+
"nonew": true,
14+
"notypeof": true,
15+
"shadow": false,
16+
"browser": true,
17+
"undef": true,
18+
"unused": "vars",
19+
"globals": {}
20+
}

gruntFile.js

Lines changed: 50 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,59 @@
11
module.exports = function (grunt) {
2-
"use strict";
2+
"use strict";
33

4-
// load all grunt tasks
5-
require('load-grunt-tasks')(grunt);
4+
// load all grunt tasks
5+
require('load-grunt-tasks')(grunt);
66

7-
// Default task.
8-
grunt.registerTask('default', ['jshint', 'karma']);
7+
// Default task.
8+
grunt.registerTask('default', ['jshint', 'karma']);
99

10-
// uglify
11-
grunt.registerTask('minify', ['uglify']);
12-
//connect - local server
13-
grunt.registerTask('serve', ['connect']);
10+
// uglify
11+
grunt.registerTask('minify', ['uglify']);
12+
13+
//connect - local server
14+
grunt.registerTask('serve', ['connect']);
1415

15-
var testConfig = function(configFile, customOptions) {
16-
var options = { configFile: configFile, keepalive: true };
17-
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox'], reporters: 'dots' };
18-
return grunt.util._.extend(options, customOptions, travisOptions);
19-
};
16+
var testConfig = function (configFile, customOptions) {
17+
var options = {
18+
configFile : configFile,
19+
keepalive : true
20+
};
21+
var travisOptions = process.env.TRAVIS && {
22+
browsers : ['Firefox'],
23+
reporters : 'dots'
24+
};
25+
return grunt.util._.extend(options, customOptions, travisOptions);
26+
};
2027

21-
// Project configuration.
22-
grunt.initConfig({
23-
karma: {
24-
unit: {
25-
options: testConfig('test/test.conf.js')
26-
}
27-
},
28-
jshint: {
29-
files: ['src/**/*.js', 'test/**/*.js', 'demo/**/*.js'],
30-
options: {
31-
curly: true,
32-
eqeqeq: true,
33-
immed: true,
34-
latedef: 'nofunc',
35-
newcap: true,
36-
noarg: true,
37-
sub: true,
38-
boss: true,
39-
eqnull: true,
40-
globals: {}
41-
}
42-
},
43-
uglify: {
44-
build: {
45-
src: ['src/**/*.js'],
46-
dest: 'calendar.min.js'
47-
}
48-
},
49-
connect: {
50-
server: {
51-
options: {
52-
port: 8000,
53-
open: true,
54-
debug: true,
55-
keepalive: true,
56-
hostname: '*',
57-
base: ['demo', '.']
58-
}
28+
// Project configuration.
29+
grunt.initConfig({
30+
karma : {
31+
unit : {
32+
options : testConfig('test/test.conf.js')
33+
}
34+
},
35+
jshint : {
36+
files : ['src/**/*.js', 'test/**/*.js', 'demo/**/*.js'],
37+
jshintrc : true
38+
},
39+
uglify : {
40+
build : {
41+
src : ['src/**/*.js'],
42+
dest : 'calendar.min.js'
43+
}
44+
},
45+
connect : {
46+
server : {
47+
options : {
48+
port : 8000,
49+
open : true,
50+
debug : true,
51+
keepalive : true,
52+
hostname : '*',
53+
base : ['demo', '.']
54+
}
55+
}
5956
}
60-
}
61-
});
57+
});
6258

6359
};

0 commit comments

Comments
 (0)