File tree 3 files changed +19
-8
lines changed
3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 8
8
"Promise": false,
9
9
},
10
10
"rules": {
11
+ "brace-style": ["error", "1tbs", {
12
+ "allowSingleLine": true,
13
+ }],
11
14
"comma-dangle": ["error", "never"],
12
15
"comma-spacing": [2, {
13
16
"before": false,
Original file line number Diff line number Diff line change @@ -13,18 +13,27 @@ module.exports = function () {
13
13
var c = typeof buf === 'string'
14
14
? buf . charAt ( i )
15
15
: String . fromCharCode ( buf [ i ] ) ;
16
- if ( c === '\n' ) { flush ( ) ; }
17
- else { line += c ; }
16
+ if ( c === '\n' ) {
17
+ flush ( ) ;
18
+ } else {
19
+ line += c ;
20
+ }
18
21
}
19
22
}
20
23
21
24
function flush ( ) {
22
25
if ( fs . writeSync && ( / ^ w i n / ) . test ( process . platform ) ) {
23
- try { fs . writeSync ( 1 , line + '\n' ) ; }
24
- catch ( e ) { stream . emit ( 'error' , e ) ; }
26
+ try {
27
+ fs . writeSync ( 1 , line + '\n' ) ;
28
+ } catch ( e ) {
29
+ stream . emit ( 'error' , e ) ;
30
+ }
25
31
} else {
26
- try { console . log ( line ) ; }
27
- catch ( e ) { stream . emit ( 'error' , e ) ; }
32
+ try {
33
+ console . log ( line ) ;
34
+ } catch ( e ) {
35
+ stream . emit ( 'error' , e ) ;
36
+ }
28
37
}
29
38
line = '' ;
30
39
}
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ test(function (tt) {
29
29
var atExpected ;
30
30
try {
31
31
to . _onTimeout ( ) ;
32
- }
33
- catch ( e ) {
32
+ } catch ( e ) {
34
33
stackExpected = stripFullStack ( e . stack ) [ 1 ] ;
35
34
stackExpected = stackExpected . replace ( 'double_end.js' , 'double_end/double.js' ) ;
36
35
stackExpected = stackExpected . trim ( ) ;
You can’t perform that action at this time.
0 commit comments