Skip to content

Commit

Permalink
chore: update ESLint and plugins/configs (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinovyatkin authored and dead-horse committed Oct 17, 2019
1 parent be7d334 commit 4dc56f6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions benchmarks/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ const app = new Koa();
// number of middleware

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

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

while (n--) {
if (useAsync) {
app.use(async(ctx, next) => await next());
app.use(async(ctx, next) => next());
} else {
app.use((ctx, next) => next());
}
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
},
"devDependencies": {
"egg-bin": "^4.13.0",
"eslint": "^6.0.1",
"eslint": "^6.5.1",
"eslint-config-koa": "^2.0.0",
"eslint-config-standard": "^7.0.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^2.1.1",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"mm": "^2.5.0",
"supertest": "^3.1.0"
},
Expand Down
6 changes: 0 additions & 6 deletions test/.eslintrc

This file was deleted.

12 changes: 12 additions & 0 deletions test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
env:
mocha: true

rules:
space-before-blocks: [2, {functions: never, keywords: always}]
no-unused-expressions: 0
node/no-deprecated-api: 'warn'
quote-props: 'warn'
no-prototype-builtins: 'warn'
array-bracket-spacing: 'warn'
object-curly-spacing: 'warn'
dot-notation: 'warn'

0 comments on commit 4dc56f6

Please sign in to comment.