DEV Community

Discussion on: Help Setting Up VSCode Formatting

Collapse
 
twigman08 profile image
Chad Smith

Thanks for trying to help as much as you could!

I went ahead and installed the prettier extension for VSCode so I could set the default formatters to what you listed to see what happens. Though pretty much what that ended up doing was causing more conflicts.

Now my typescript files are being formatted (not a very good format that I like I might add), but my vue files get formatted completely different now, and you can tell that it has two formatters fighting with each other. When I save a .vue file now, it attempts to format the way it was, but then it goes and reformats a completely different way which ends up causing linting issues. So now it seems to be fully conflicting with the linting rules that are setup.

So I think I am sadly back what I am trying to solve and understand better: What is the way to setup these formatters so it listens to the project settings, and to keep from from conflicting? Every extension, plus VSCode, seems to have their own formatting and it's really confusing to know which setting you should be using properly. Sadly this seems to be the issue I fight with javascript development all too often and I haven't found the right article or tutorial that really describes everything that works. I think that is why I am really just trying to enlist the help from community members to hopefully figure this out, and maybe even then I could just write the article that someone could always use.

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

When I save a .vue file now, it attempts to format the way it was, but then it goes and reformats a completely different way which ends up causing linting issues. So now it seems to be fully conflicting with the linting rules that are setup.

I wish I could be more helpful - because I definitely remember having this exact issue, but I sadly don't remember how I corrected it 😢

Pulling together an article to walk through setting this up would be very helpful! Wish I could help more!