Format Space within braces for ES6 import/export in vue files

I haven't been able to figure out how to set the format to add or retain the spaces within braces for ES6 import/export line in Vue files.

I would like it to be

import { ref, computed } from 'vue'

But just now it will format to

import {ref, computed} from 'vue'

I have set the option for TypeScript but this doesn't follow through to Vue.

Ideally I would be looking to also be able to set this in the .editorconfig file as well.

Is this currently possible?

0
7 comments

works fine for me - the Spaces | Within | ES6 import/export braces option does affect the .vue files

Does it work in .ts files for you? do you have .editorconfig in your project, is Editorconfig and/or Prettier support enabled?

0

It works correctly in .ts files but not in the .vue files.

.editorconfig file is present in the project and support is enabled, I don't use Prettier.

0

>editorconfig file is present in the project and support is enabled

 

please try disabling it - does it make any difference?

0

Disabling it has made no difference, still works in .ts files but not .vue files.

0

please could you share a screen recording of the issue? Is ES6 import/export braces the only option that doesn't work?

0

I figured this one out, Vue files pull their code style from the JavaScript section and not the TypeScript section. After setting ES6 import/export braces to true in the JavaScript section it is working as intended.

0

The code style being used depends on a script language - the Vue files with 

<script lang="ts">

pull their code style from the Typescript section, the ones with 

<script>

- from JavaScript

0

Please sign in to leave a comment.