File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ const app = new Koa();
77// number of middleware
88
99let n = parseInt ( process . env . MW || '1' , 10 ) ;
10- let useAsync = process . env . USE_ASYNC === 'true' ;
10+ const useAsync = process . env . USE_ASYNC === 'true' ;
1111
1212console . log ( ` ${ n } ${ useAsync ? ' async' : '' } middleware` ) ;
1313
1414while ( n -- ) {
1515 if ( useAsync ) {
16- app . use ( async ( ctx , next ) => await next ( ) ) ;
16+ app . use ( async ( ctx , next ) => next ( ) ) ;
1717 } else {
1818 app . use ( ( ctx , next ) => next ( ) ) ;
1919 }
Original file line number Diff line number Diff line change 4949 },
5050 "devDependencies" : {
5151 "egg-bin" : " ^4.13.0" ,
52- "eslint" : " ^6.0 .1" ,
52+ "eslint" : " ^6.5 .1" ,
5353 "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" ,
5759 "mm" : " ^2.5.0" ,
5860 "supertest" : " ^3.1.0"
5961 },
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