Static GitHub Issues

[2053] How to configure Visual Studio Code to insert space before function parenthesis

prev: vuex modules error unknown action type
next: Preloader?

Hi,

I've created a new Nuxt project using the Nuxt starter template

$ vue init nuxt-community/starter-template nuxt-project
$ cd nuxt-project
$ code .

This is what I want async asyncData () {}

But when I hit save, VSC continue to remove the space before function parenthesis

<script>
export default {
  async asyncData() {}
}
</script>

I've installed only two VSC extensions

  • ESLint 1.4.3
  • Prettier - JavaScript formatter 0.24.0
  • Vetur 0.11.0

And this is my user settings file

{
  "telemetry.enableCrashReporter": false,
  "telemetry.enableTelemetry": false,
  "window.zoomLevel": 0,
  "workbench.colorTheme": "Quiet Light",
  "editor.minimap.enabled": false,
  "editor.fontSize": 12,
  "editor.tabSize": 2,
  "editor.lineHeight": 20,
  "editor.formatOnSave": true,
  "files.trimTrailingWhitespace": true,
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true
}

What I'm doing wrong?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1821">#c1821</a>)</em></sub></div>