Skip to content

Commit

Permalink
feat(tasks): add lint tasks
Browse files Browse the repository at this point in the history
adds lint tasks for js and ts using respectively eslint or tslint
  • Loading branch information
zewa666 committed Aug 24, 2017
1 parent 3568886 commit 596442a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/resources/tasks/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import gulp from 'gulp';
import eslint from 'gulp-eslint';
import project from '../aurelia.json';

export default function lint() {
return gulp.src([project.transpiler.source])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
}
6 changes: 6 additions & 0 deletions lib/resources/tasks/lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "lint",
"description": "Lint source files",
"flags": [
]
}
11 changes: 11 additions & 0 deletions lib/resources/tasks/lint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as gulp from 'gulp';
import tslint from 'gulp-tslint';
import * as project from '../aurelia.json';

export default function lint() {
return gulp.src([project.transpiler.source])
.pipe(tslint({
tslint: require("tslint")
}))
.pipe(tslint.report("prose"));
}

0 comments on commit 596442a

Please sign in to comment.