Closed
Bug 1838298
Opened 2 years ago
Closed 4 months ago
Introduce CSS lint rule to prevent base design tokens from being used directly
Categories
(Toolkit :: Themes, enhancement)
Toolkit
Themes
Tracking
()
RESOLVED
FIXED
132 Branch
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: hjones, Assigned: hjones)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [recomp])
Attachments
(2 files)
With the landing of Bug 1508369 we now have stylelint enabled for linting CSS files. We should try take advantage of this to implement a custom linter rule to warn or prevent people from using our base token values directly. Currently there's no way to know the intended use of those variables without reading this comment.
Assignee | ||
Updated•2 years ago
|
Whiteboard: [fidefe-reusable-components]
Updated•2 years ago
|
Updated•1 year ago
|
Whiteboard: [fidefe-reusable-components] → [recomp]
Assignee | ||
Comment 1•5 months ago
|
||
Assignee | ||
Comment 2•4 months ago
|
||
This patch lays the foundation for a Mozilla-specific Stylelint plugin that we can continue to expand on with new rules as needed. For the first rule I've implemented a simple check to ensure our color tokens are being used as intended.
Updated•4 months ago
|
Assignee: nobody → hjones
Status: NEW → ASSIGNED
Updated•4 months ago
|
Attachment #9425687 -
Attachment description: WIP: Bug 1838298 - custom stylelint rule to prevent using color tokens directly → Bug 1838298 - Part 2: fix color token usage in line with new Stylelint rule r=#desktop-theme-reviewers
Updated•4 months ago
|
Blocks: css-linting
Pushed by hjones@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4e625378c9e
Custom Stylelint plugin to prevent color tokens from being used directly r=Standard8,frontend-codestyle-reviewers,desktop-theme-reviewers,dao
https://hg.mozilla.org/integration/autoland/rev/53cefe94a9f5
Part 2: fix color token usage in line with new Stylelint rule r=desktop-theme-reviewers,settings-reviewers,reusable-components-reviewers,home-newtab-reviewers,dao,thecount
Comment 4•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f4e625378c9e
https://hg.mozilla.org/mozilla-central/rev/53cefe94a9f5
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
status-firefox132:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•