Skip to content

Playground "format" feature has started formatting with tabs / 4 spaces for any file not App.vue #9329

@WORMSS

Description

@WORMSS

Vue version

Playground

Link to minimal reproduction

https://play.vuejs.org/#eNp9UU9LwzAU/yoxlyrMFdltdAOVgXpQUcFLLqN96zLTJCQvdVD63X1JabeD7BLyfn+S33uv4/fWztsAfMkLXzppkXnAYNdCy8Yah6xjDnasZztnGpaRNBNa6NJoj6zxNVtF/jp7AqUM+zZOVVfZjdBFPjxHD1GB0Fi1RaCKsWJ/t+66ZO77IqcqoVLbgKy9bUwFaiU48YITVeSTm884evp6J+v5wRtNqbvoFbw0jZUK3JtFSdEEX7LERG5LyX5fEoYuwGzEyz2UP//gB3+MmODvDjy4FgSfONy6GnCgN5+vcKT7RFLyoEh9gfwAb1SIGQfZQ9AVxT7TpbTPafZS119+c0TQfmwqBo3KPukFp308Xmj9FHcxXySf0D1NMXrGtZ9249IeKtmuizyeETiffv8HHOK5Cg==

Steps to reproduce

Go to link, select Comp.vue tab, and go rightclick -> Format Document

What is expected?

To format exactly the same as App.vue

What is actually happening?

Any file that is not App.vue such as Comp.vue or somefile.js or somefile.ts they all get formatted with either Tabs or 4 spaces,

But if you tried to force 4 spaces into App.vue and do format, it strips it back down to 2 spaces (my prefered)

It's very weird that ONLY App.vue formats in one way, and EVERY OTHER file formats with completely different settings.

System Info

No response

Any additional comments?

This taken a while for me to work out, I knew something weird was going on, so I stopped formatting files, but then I did it out of habit and then 'it worked again' so I started formatting again, and then 'it was broken again'..
It has been days of using the playground on and off to realise it was File Dependant for when formatting worked vs was broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions