-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
52 lines (52 loc) · 1.12 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
module.exports = function(grunt) {
require("time-grunt")(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
eslint: {
main: {
options: {
overrideConfigFile: ".eslintrc.json",
},
src: ["*.js"]
}
},
stylelint: {
simple: {
options: {
overrideConfigFile: ".stylelintrc"
},
src: ["*.css"]
}
},
jsonlint: {
main: {
src: ["package.json", ".eslintrc.json", ".stylelint"],
options: {
reporter: "jshint"
}
}
},
markdownlint: {
all: {
options: {
config: {
"default": true,
"MD013": {"tables": false},
"MD033": {"allowed_elements": ["br"]}
}
},
src: ["*.md"]
}
},
yamllint: {
all: [".travis.yml"]
}
});
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-jsonlint");
grunt.loadNpmTasks("grunt-markdownlint");
grunt.loadNpmTasks("grunt-staged");
grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint"]);
grunt.registerTask("precommit", ["staged:eslint", "staged:stylelint", "staged:jsonlint", "staged:markdownlint"]);
};