Closed dzeroone closed 6 years ago
I noticed this is from a Koa example, but the style is slightly different than Koa's usual style of no spaces before function parentheses, which is why we get the linter error here.
You should change async (ctx, next)
to async(ctx, next)
and the error will go away. Let me know if you're okay with this fix or if you'd like to discuss changing this rule (which would affect other Koa projects).
I like async (ctx, next)
this style. So, I have modified .eslintrc rules for my local projects on my own :)
That's fine, this is just a base config for the convenience of Koa but you can use whatever you'd like. I'm closing this since Koa is continuing to use the style. Also note that ESLint 4 has some more strict rules, so updating from ESLint 3 could also cause this to appear.
Example