palantir / grunt-tslint

A Grunt plugin for tslint.
Apache License 2.0
51 stars 37 forks source link

outputReport option to report results back to grunt #33

Closed gronke closed 8 years ago

gronke commented 8 years ago

Use the outputReport option to pass the tslint results to a Grunt configuration setting that can be referenced from other tasks like in this example:

grunt.initConfig({
    tslint: {
        options: {
            formatter: 'json',
            outputReport: 'tslint.report',
            force: true
        },
        files: {
            src: [
                '{,**/}*.ts'
            ]
        }
    }
}

grunt.registerTask('print', function() {
    console.log(grunt.config('tslint.report'));
});

grunt.registerTask('default', ['tslint', 'print']);

It also introduces the force option, because the print task would not execute without.

gronke commented 8 years ago

Branch is rebased. Quite a few changes already found their way into master, so that the changes became a lot simpler 😺