Use Prettier for formatting CSS files
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox141 fixed)
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: Honza, Assigned: hjones)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [recomp])
Attachments
(19 files, 2 obsolete files)
|
45.13 KB,
text/css
|
Details | |
|
44.60 KB,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1606785 - Format urlbar CSS files with Prettier r=#urlbar-reviewers,#desktop-theme-reviewers,dao
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
It would be great to have unified style formatting for all DevTools CSS files.
- Consistency across our code base
- Easier reviews
- IDE integrations (e.g. VS Code docs)
- Automation through
./mach eslint
WDYT?
Honza
Comment 1•6 years ago
|
||
What about doing it on the whole tree?
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Victor, I believe we talked about this when we discussed prettier. What do you think about linting CSS in devtools or all of tree?
Comment 3•6 years ago
|
||
Clearing stale needinfo.
If we decide to move forward, we should dupe bug 1508369 to this.
Comment 4•6 years ago
|
||
It is being discussed (on the roadmap or not)
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•2 years ago
|
||
We are not planning to move forward with this at the moment. There's some summarized context in bug 1921088 comment 2.
Instead we probably want to use the stylistic-stylelint rules rolled out more widely than the new tab code, which gives us some of the same benefits described here.
| Assignee | ||
Comment 8•1 year ago
|
||
| Assignee | ||
Comment 9•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
| Assignee | ||
Comment 11•1 year ago
|
||
I spent some time investigating different options for formatting out CSS files and reached the conclusion that we would be better off going with Prettier over stylistic-stylelint. I wrote a doc (internal access only) covering what I did/my conclusions, but just to summarize briefly Prettier:
- integrates better with our
./machtooling - integrates with IDEs and code editors in a way that provides a better developer experience
- should allow us to fix most formatting/stylistic errors before code gets pushed up for review
- is already familiar to most developers and has robust community support
Additionally some of the most objectionable changes Prettier was trying to make to our CSS files are avoidable by configuring printWidth to not break lines so aggressively. Reopening this bug as I've already started the work to enable Prettier for our CSS files.
| Assignee | ||
Comment 12•1 year ago
|
||
| Assignee | ||
Comment 13•1 year ago
|
||
| Assignee | ||
Comment 14•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
| Assignee | ||
Comment 17•1 year ago
|
||
| Assignee | ||
Comment 18•1 year ago
|
||
| Assignee | ||
Comment 19•1 year ago
|
||
| Assignee | ||
Comment 20•1 year ago
|
||
| Assignee | ||
Comment 21•1 year ago
|
||
| Assignee | ||
Comment 22•1 year ago
|
||
| Assignee | ||
Comment 23•1 year ago
|
||
| Assignee | ||
Comment 24•1 year ago
|
||
| Assignee | ||
Comment 25•1 year ago
|
||
| Assignee | ||
Comment 26•1 year ago
|
||
| Assignee | ||
Comment 27•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 28•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 29•1 year ago
|
||
Comment 30•1 year ago
|
||
Comment 31•1 year ago
|
||
Backed out for causing multiple failures.
- Backout link
- Push with failures
- Failure Log dt @browser_rules_copy_styles.js
- Failure Log mozlint
- Failure Log SM @ struct-fields.js
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 32•1 year ago
|
||
Comment 33•1 year ago
|
||
Comment 34•1 year ago
|
||
Comment 35•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b10012be5d43
https://hg.mozilla.org/mozilla-central/rev/85fb16265b32
https://hg.mozilla.org/mozilla-central/rev/9d0eb46721e2
https://hg.mozilla.org/mozilla-central/rev/86bb0e6d3c36
https://hg.mozilla.org/mozilla-central/rev/4045a0e95372
https://hg.mozilla.org/mozilla-central/rev/4ae3860a63bc
https://hg.mozilla.org/mozilla-central/rev/fe857c0eaa35
https://hg.mozilla.org/mozilla-central/rev/0f18da6e25ec
https://hg.mozilla.org/mozilla-central/rev/509b0ce5a617
https://hg.mozilla.org/mozilla-central/rev/f2aac34af2e9
https://hg.mozilla.org/mozilla-central/rev/a05e0c7a4de3
https://hg.mozilla.org/mozilla-central/rev/c6654494b739
https://hg.mozilla.org/mozilla-central/rev/bea2b9e6b9a7
https://hg.mozilla.org/mozilla-central/rev/fa19eaf842b6
https://hg.mozilla.org/mozilla-central/rev/cc2a6d98ffb4
https://hg.mozilla.org/mozilla-central/rev/01b13f86a4ac
https://hg.mozilla.org/mozilla-central/rev/593d12c6549d
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Description
•