Search code examples
javascriptnode.jswebstormeslintvisual-studio-code

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 ?


Solution

  • I think this should do the trick

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

    for more info visit here