简体   繁体   中英

How to format space around function in JavaScript by ESLint on VSCode?

Current VSCode Auto Formatted:

co(function* (){})

What I want (was set by WebStorm):

co(function *(){})

What rule should I set in.eslintrc.js or VSCode's settings.json?

I think this should do the trick

"generator-star-spacing": ["error", {"before": true, "after": false}]

for more info visit here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM