12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gulp-tslintを使ってみた

Posted at

TypeScriptを使い始めているのですが今のとこGulpでタスクを組んでコンパイルしています。で、Lintも当然ほしくなるので入れてみました。

使ったパッケージ

  • gulp-tslint
    • Lint本体
  • gulp-plumber
    • watch時にLintでこけても止まらないように
  • gulp-notify
    • Lintでこけたときに通知する
    • こんな感じで表示される

tslint.png

タスク

gulp.task("tslint", function() {
    gulp.src([
        "./ts/**/*.d.ts"
    ])
    .pipe(plumber({errorHandler: notify.onError('Error: TSLint!!')}))
    .pipe(tslint({
        configuration: "Gulp/tasks/config/tslint.json"
    }))
    .pipe(tslint.report("verbose"));
});

12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?