File tree 4 files changed +20
-12
lines changed
4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ const app = new Koa();
7
7
// number of middleware
8
8
9
9
let n = parseInt ( process . env . MW || '1' , 10 ) ;
10
- let useAsync = process . env . USE_ASYNC === 'true' ;
10
+ const useAsync = process . env . USE_ASYNC === 'true' ;
11
11
12
12
console . log ( ` ${ n } ${ useAsync ? ' async' : '' } middleware` ) ;
13
13
14
14
while ( n -- ) {
15
15
if ( useAsync ) {
16
- app . use ( async ( ctx , next ) => await next ( ) ) ;
16
+ app . use ( async ( ctx , next ) => next ( ) ) ;
17
17
} else {
18
18
app . use ( ( ctx , next ) => next ( ) ) ;
19
19
}
Original file line number Diff line number Diff line change 49
49
},
50
50
"devDependencies" : {
51
51
"egg-bin" : " ^4.13.0" ,
52
- "eslint" : " ^6.0 .1" ,
52
+ "eslint" : " ^6.5 .1" ,
53
53
"eslint-config-koa" : " ^2.0.0" ,
54
- "eslint-config-standard" : " ^7.0.1" ,
55
- "eslint-plugin-promise" : " ^3.5.0" ,
56
- "eslint-plugin-standard" : " ^2.1.1" ,
54
+ "eslint-config-standard" : " ^14.1.0" ,
55
+ "eslint-plugin-import" : " ^2.18.2" ,
56
+ "eslint-plugin-node" : " ^10.0.0" ,
57
+ "eslint-plugin-promise" : " ^4.2.1" ,
58
+ "eslint-plugin-standard" : " ^4.0.1" ,
57
59
"mm" : " ^2.5.0" ,
58
60
"supertest" : " ^3.1.0"
59
61
},
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ env :
2
+ mocha : true
3
+
4
+ rules :
5
+ space-before-blocks : [2, {functions: never, keywords: always}]
6
+ no-unused-expressions : 0
7
+ node/no-deprecated-api : ' warn'
8
+ quote-props : ' warn'
9
+ no-prototype-builtins : ' warn'
10
+ array-bracket-spacing : ' warn'
11
+ object-curly-spacing : ' warn'
12
+ dot-notation : ' warn'
You can’t perform that action at this time.
0 commit comments