gulp-tslint
Advanced tools
Comparing version 6.0.2 to 6.1.0
@@ -0,1 +1,7 @@ | ||
<a name="6.1.0"></a> | ||
# 6.0.3 (2016-07-29) | ||
- Allow custom formatter as a function [pull #68](https://github.com/panuhorsmalahti/gulp-tslint/pull/68). | ||
- Allow type checked rules | ||
<a name="6.0.0"></a> | ||
@@ -2,0 +8,0 @@ # 6.0.0 (2016-07-09) |
export interface PluginOptions { | ||
configuration?: any; | ||
formatter?: string; | ||
formatter?: string | Function; | ||
formattersDirectory?: string; | ||
rulesDirectory?: string; | ||
tslint?: any; | ||
program?: any; | ||
} | ||
@@ -8,0 +9,0 @@ export interface ReportOptions { |
@@ -93,2 +93,3 @@ /*jshint node:true */ | ||
formattersDirectory: pluginOptions.formattersDirectory || null, | ||
program: pluginOptions.program || null, | ||
rulesDirectory: pluginOptions.rulesDirectory || null | ||
@@ -103,3 +104,3 @@ }; | ||
} | ||
tslint = new linter(file.relative, file.contents.toString("utf8"), options); | ||
tslint = new linter(file.relative, file.contents.toString("utf8"), options, options.program); | ||
file.tslint = tslint.lint(); | ||
@@ -106,0 +107,0 @@ // Pass file |
{ | ||
"name": "gulp-tslint", | ||
"preferGlobal": false, | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"author": "Panu Horsmalahti <panu.horsmalahti@iki.fi>", | ||
@@ -6,0 +6,0 @@ "description": "TypeScript linter Gulp plugin", |
@@ -155,2 +155,16 @@ gulp-tslint | ||
Type checked rules | ||
------------------ | ||
Type checked rules require a TypeScript program object to be provided to the linter in the options. For more information see tslint documentation. | ||
```javascript | ||
var gulpTslint = require("gulp-tslint"); | ||
var tslint = require("tslint"); | ||
var program = tslint.createProgram("./tsconfig.json"); | ||
// ... | ||
.pipe(gulpTslint({ program })) | ||
``` | ||
All default tslint options | ||
@@ -165,3 +179,4 @@ -------------------------- | ||
rulesDirectory: null, | ||
tslint: null | ||
tslint: null, | ||
program: null | ||
}; | ||
@@ -168,0 +183,0 @@ ``` |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20452
261
198