Subscribe on changes!

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

avatar
Oct 3rd 2023

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.

avatar
Oct 4th 2023

Unable to reproduce from my side. Always 2 spaces for all the files.

avatar
Oct 4th 2023

Oh, this is weird, now that I have refreshed, it's no longer doing it my end either.. I will keep this open for a little while since it seems to be an intermittent thing and I obviously thought I caught the reason for it, but it's obviously deeper than that.. If I don't see it again after significant usage, I will close this.

avatar
Oct 16th 2023

It's been two weeks now. So, I'm closing this issue. If you encounter similar issues again and can follow up with more information, please open a new issue with a reference to this one.