make `mach format` run JS formatters
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Tracking
(Not tracked)
People
(Reporter: sheehan, Unassigned)
References
(Blocks 1 open bug)
Details
mach format
currently runs a few different formatting-only linters. We should add JS formatting to mach format
.
Comment 1•2 years ago
|
||
I have a concern with a separate command - how do we make this easy for developers? Currently they run ./mach lint
and that's it.
If these are separated out, then they'll need to run ./mach lint
and then ./mach format
. That's now two commands and the order is important. I agree that we need to run format only for lando, but I think we need to consider the developer experience here as well.
Maybe we could keep ./mach lint
doing both - it runs the existing linter, than runs ./mach format
automatically for the developer?
Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Mark Banner (:standard8) (afk until 3rd Jan) from comment #1)
I have a concern with a separate command - how do we make this easy for developers? Currently they run
./mach lint
and that's it.If these are separated out, then they'll need to run
./mach lint
and then./mach format
. That's now two commands and the order is important. I agree that we need to run format only for lando, but I think we need to consider the developer experience here as well.Maybe we could keep
./mach lint
doing both - it runs the existing linter, than runs./mach format
automatically for the developer?
As I understand it the plan for mach format
is to continue aliasing mach lint --fix
but only for a subset of linters, specifically linters that are formatting-only. So this bug would essentially add the JS formatters to that subset here.
Comment 3•2 years ago
|
||
With bug 1809497 landing, this might now be possible if we're able to pass an option to the ESLint part of ./mach lint
which would turn off the ESLint part.
Comment 4•1 years ago
|
||
Would anyone be able to work on this?
I think this we need to add an option adding to ./mach lint --fix
so that for -l eslint
only the formatting (Prettier) part is run here.
That would then unblock bug 1807712.
Updated•1 years ago
|
Reporter | ||
Comment 5•1 years ago
|
||
I don't have the cycles to work on this right now, but I could try and take a look at it again in Q3.
Description
•