question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

First of all, thanks for this amazing template. Not only is it easy to get started mocking up new application with this, but it’s also taught me a million things about different aspects of Vite and Vue.

I have noticed one small issue, though I’m not 100% sure it’s due to my VSCode or due to a conflict in rulesets for ESLint/formatting.

Out of the box, in the file index.vue, there is the following ESLint warning:

Expected 1 line break after opening tag (<button>), but no line breaks found.

When saving, it tries to auto fix this by placing the content between opening and closing tag on the next line, which is good, but it then immediately reverts to how it was before in a split second. Is this a case of two successive formatters doing opposite things? If this has nothing to do with your template and it’s my own setup causing this, just tell me and I’ll look for a deeper cause in my own VSCode.

Thanks again for all the hard work at giving Vite such a huge boost from the get-go!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Raguracommented, Aug 19, 2021

Hello, @Ragura I am having hard timing configuring Volar + ESLint for formatting. Can you please share a minimal vite-vue-ts setup with ESLint & Volar formatting?

Regards.

Hi @jd-0001, I’m using the default extension settings, together with the tsconfig.json that came with the Vitesse template. Just make sure VS Code is actually using ESLint to do the formatting, else you’ll get warnings about the formatting, but it won’t correct them automatically.

0reactions
jd-solankicommented, Aug 19, 2021

Hello, @Ragura I am having hard timing configuring Volar + ESLint for formatting. Can you please share a minimal vite-vue-ts setup with ESLint & Volar formatting?

Regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make ESLint work with Prettier avoiding conflicts and ...
In this post I try to give a couple of indications to configure VSCode properly and avoid problems and conflicts. Prerequisites. -Visual Studio ......
Read more >
ESLint rule conflicts with Prettier rule - Stack Overflow
I want to use ESLint for finding errors in Javascript code and Prettier for formatting all languges. But it seems that we could...
Read more >
Conflict with prettier · Issue #14858 · eslint/eslint - GitHub
ESLint prevents conflicts by not applying overlapping fixes, but each individual fix should be complete (should produce valid code after ...
Read more >
Integrating with Linters - Prettier
Linters. Luckily it's easy to turn off rules that conflict or are unnecessary with Prettier, by using these pre-made configs: eslint-config- ...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
Note that a fix is not immediately applied, and may not be applied at all if there are conflicts with other fixes. After...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found