File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ var tslintPlugin = function (pluginOptions) {
87
87
}
88
88
// TSLint default options
89
89
var options = {
90
+ fix : pluginOptions . fix || false ,
90
91
formatter : pluginOptions . formatter || "prose" ,
91
92
formattersDirectory : pluginOptions . formattersDirectory || null ,
92
93
rulesDirectory : pluginOptions . rulesDirectory || null
@@ -99,7 +100,7 @@ var tslintPlugin = function (pluginOptions) {
99
100
pluginOptions . configuration = linter . Configuration . findConfiguration ( pluginOptions . configuration || null , file . path ) . results ;
100
101
}
101
102
tslint = new linter . Linter ( options , pluginOptions . program ) ;
102
- tslint . lint ( file . relative , file . contents . toString ( "utf8" ) , pluginOptions . configuration ) ;
103
+ tslint . lint ( file . path , file . contents . toString ( "utf8" ) , pluginOptions . configuration ) ;
103
104
file . tslint = tslint . getResult ( ) ;
104
105
// Pass file
105
106
cb ( null , file ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const map = require("map-stream");
13
13
14
14
export interface PluginOptions {
15
15
configuration ?: any ;
16
+ fix ?: boolean ;
16
17
formatter ?: string | Function ;
17
18
formattersDirectory ?: string ;
18
19
rulesDirectory ?: string ;
@@ -137,6 +138,7 @@ const tslintPlugin = <TslintPlugin> function(pluginOptions?: PluginOptions) {
137
138
138
139
// TSLint default options
139
140
const options = {
141
+ fix : pluginOptions . fix || false ,
140
142
formatter : pluginOptions . formatter || "prose" ,
141
143
formattersDirectory : pluginOptions . formattersDirectory || null ,
142
144
rulesDirectory : pluginOptions . rulesDirectory || null
@@ -155,7 +157,7 @@ const tslintPlugin = <TslintPlugin> function(pluginOptions?: PluginOptions) {
155
157
}
156
158
157
159
tslint = new linter . Linter ( options , pluginOptions . program ) ;
158
- tslint . lint ( file . relative , file . contents . toString ( "utf8" ) , pluginOptions . configuration ) ;
160
+ tslint . lint ( file . path , file . contents . toString ( "utf8" ) , pluginOptions . configuration ) ;
159
161
file . tslint = tslint . getResult ( ) ;
160
162
161
163
// Pass file
You can’t perform that action at this time.
0 commit comments