S
S
serg8012021-01-29 12:22:29
JavaScript
serg801, 2021-01-29 12:22:29

How to format code with linter in VueJS project?

By default, a VueJS project has a "lint" command in package.json (npm run rint). The command does not "format" the code, it only displays "notifications".

Question: how to format indents in html (*.vue), CSS, JS etc?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iBird Rose, 2021-01-29
@iiiBird

look for plugins for the editor that will do this.
for example, storm should format on save by default if the project has eslint.
for vscode, I found such a plugin https://marketplace.visualstudio.com/items?itemNam...
in general, google in this direction

O
Orkhan Hasanli, 2021-01-29
@azerphoenix

As far as I remember, jetBrains products (Storm, IDEA) have this by default.
In Sublime Text 3 - look for the beautify plugin. Some of them require node
There are plugins for VSCode too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question