Skip to content

Commit 596442a

Browse files
committed
feat(tasks): add lint tasks
adds lint tasks for js and ts using respectively eslint or tslint
1 parent 3568886 commit 596442a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

lib/resources/tasks/lint.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import gulp from 'gulp';
2+
import eslint from 'gulp-eslint';
3+
import project from '../aurelia.json';
4+
5+
export default function lint() {
6+
return gulp.src([project.transpiler.source])
7+
.pipe(eslint())
8+
.pipe(eslint.format())
9+
.pipe(eslint.failAfterError());
10+
}

lib/resources/tasks/lint.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "lint",
3+
"description": "Lint source files",
4+
"flags": [
5+
]
6+
}

lib/resources/tasks/lint.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as gulp from 'gulp';
2+
import tslint from 'gulp-tslint';
3+
import * as project from '../aurelia.json';
4+
5+
export default function lint() {
6+
return gulp.src([project.transpiler.source])
7+
.pipe(tslint({
8+
tslint: require("tslint")
9+
}))
10+
.pipe(tslint.report("prose"));
11+
}

0 commit comments

Comments
 (0)