File tree Expand file tree Collapse file tree 6 files changed +52
-12
lines changed Expand file tree Collapse file tree 6 files changed +52
-12
lines changed Original file line number Diff line number Diff line change
1
+ ## v0.2.1
2
+ * Fix for ` tslint: true ` option issue
3
+
1
4
## v0.2.0
2
5
* tsconfig.json and tslint.json path are not printed anymore.
3
6
* ` watch ` option is not used on 'build' mode
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ function ForkTsCheckerWebpackPlugin (options) {
20
20
this . options = Object . assign ( { } , options ) ;
21
21
22
22
this . tsconfig = options . tsconfig || './tsconfig.json' ;
23
- this . tslint = options . tslint ? isString ( options . tslint ) ? options . tslint : './tslint.json' : undefined ;
23
+ this . tslint = options . tslint ?
24
+ options . tslint === true ? './tslint.json' : options . tslint : undefined ;
24
25
this . watch = isString ( options . watch ) ? [ options . watch ] : options . watch || [ ] ;
25
26
this . ignoreDiagnostics = options . ignoreDiagnostics || [ ] ;
26
27
this . ignoreLints = options . ignoreLints || [ ] ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " fork-ts-checker-webpack-plugin" ,
3
- "version" : " 0.2.0 " ,
3
+ "version" : " 0.2.1 " ,
4
4
"description" : " Runs typescript type checker and linter on separate process." ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -121,4 +121,10 @@ describe('[INTEGRATION] index', function () {
121
121
callback ( ) ;
122
122
}
123
123
} ) ;
124
+
125
+ it ( 'should detect tslint path for true option' , function ( ) {
126
+ expect ( function ( ) {
127
+ createCompiler ( { tslint : true } ) ;
128
+ } ) . to . not . throw . error ;
129
+ } ) ;
124
130
} ) ;
Original file line number Diff line number Diff line change
1
+ var describe = require ( 'mocha' ) . describe ;
2
+ var it = require ( 'mocha' ) . it ;
3
+ var expect = require ( 'chai' ) . expect ;
4
+ var ForkTsCheckerWebpackPlugin = require ( '../../lib/index' ) ;
5
+
6
+ describe ( '[UNIT] index' , function ( ) {
7
+
8
+ it ( 'should allow to pass no options' , function ( ) {
9
+ expect ( function ( ) {
10
+ new ForkTsCheckerWebpackPlugin ( ) ;
11
+ } ) . to . not . throw . error ;
12
+ } ) ;
13
+
14
+ it ( 'should detect paths' , function ( ) {
15
+ var plugin = new ForkTsCheckerWebpackPlugin ( { tslint : true } ) ;
16
+
17
+ expect ( plugin . tsconfig ) . to . be . equal ( './tsconfig.json' ) ;
18
+ expect ( plugin . tslint ) . to . be . equal ( './tslint.json' ) ;
19
+ } ) ;
20
+
21
+ it ( 'should set logger to console by default' , function ( ) {
22
+ var plugin = new ForkTsCheckerWebpackPlugin ( { } ) ;
23
+
24
+ expect ( plugin . logger ) . to . be . equal ( console ) ;
25
+ } ) ;
26
+
27
+ it ( 'should set watch to empty array by default' , function ( ) {
28
+ var plugin = new ForkTsCheckerWebpackPlugin ( { } ) ;
29
+
30
+ expect ( plugin . watch ) . to . be . deep . equal ( [ ] ) ;
31
+ } ) ;
32
+
33
+ it ( 'should set watch to one element array for string' , function ( ) {
34
+ var plugin = new ForkTsCheckerWebpackPlugin ( { watch : '/test' } ) ;
35
+
36
+ expect ( plugin . watch ) . to . be . deep . equal ( [ '/test' ] ) ;
37
+ } ) ;
38
+
39
+ } ) ;
Original file line number Diff line number Diff line change @@ -2493,16 +2493,7 @@ typescript@^2.1.0:
2493
2493
version "2.3.2"
2494
2494
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.2.tgz#f0f045e196f69a72f06b25fd3bd39d01c3ce9984"
2495
2495
2496
- uglify-js@^2.6 :
2497
- version "2.8.22"
2498
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0"
2499
- dependencies :
2500
- source-map "~0.5.1"
2501
- yargs "~3.10.0"
2502
- optionalDependencies :
2503
- uglify-to-browserify "~1.0.0"
2504
-
2505
- uglify-js@^2.8.27 :
2496
+ uglify-js@^2.6, uglify-js@^2.8.27 :
2506
2497
version "2.8.27"
2507
2498
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c"
2508
2499
dependencies :
You can’t perform that action at this time.
0 commit comments