Skip to content

Commit 4dc56f6

Browse files
tinovyatkindead-horse
authored andcommitted
chore: update ESLint and plugins/configs (#1407)
1 parent be7d334 commit 4dc56f6

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

benchmarks/middleware.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ const app = new Koa();
77
// number of middleware
88

99
let n = parseInt(process.env.MW || '1', 10);
10-
let useAsync = process.env.USE_ASYNC === 'true';
10+
const useAsync = process.env.USE_ASYNC === 'true';
1111

1212
console.log(` ${n}${useAsync ? ' async' : ''} middleware`);
1313

1414
while (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
}

package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@
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
},

test/.eslintrc

-6
This file was deleted.

test/.eslintrc.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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'

0 commit comments

Comments
 (0)