-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtilt-lint.js
60 lines (28 loc) · 958 Bytes
/
tilt-lint.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
/* eslint-env node */
/* jshint node: true */
"use strict";
var shell = require('gulp-shell');
function task(Options) {
var DefaultConfig = "node_modules/tilt-eslint/tilt-js-lint-rules.json";
Options = Options || {};
Options.targets = (Options.targets || "gulpfile.js") + " --no-ignore";
Options.config = Options.config || DefaultConfig;
var Task = "eslint" +
" -c " + Options.config +
" " + Options.targets;
console.log(Task);
return shell.task(Task, {quiet: false});
}
function gulpreg(Gulp, Options) {
var Taskname = Options.taskname || "lint",
Targets = Options.targets || "gulpfile.js",
Config = Options.config;
Gulp.task(Taskname, task({
"targets" : Targets,
"config" : Config
}));
}
module.exports = {
"gulpreg" : gulpreg,
"task" : task
};