ref(🥞): add no-z-index lint rule banning z-index declarations#115963
Draft
natemoo-re wants to merge 7 commits into
Draft
ref(🥞): add no-z-index lint rule banning z-index declarations#115963natemoo-re wants to merge 7 commits into
natemoo-re wants to merge 7 commits into
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.59% |
0e6e40d to
579605a
Compare
825d252 to
77c8a9c
Compare
77c8a9c to
835c0d3
Compare
835c0d3 to
2b151ad
Compare
2b151ad to
fd3852b
Compare
fd3852b to
98dc8a2
Compare
255dc7c to
97da138
Compare
a61cbae to
de06aab
Compare
97da138 to
f0adcb8
Compare
5a61026 to
d04c99e
Compare
f0adcb8 to
1d3b325
Compare
d04c99e to
3e3e962
Compare
1d3b325 to
471b49d
Compare
3e3e962 to
6f10afb
Compare
6f10afb to
435df52
Compare
435df52 to
05075ed
Compare
05075ed to
f90324e
Compare
Bans z-index CSS declarations and zIndex props/style properties, except for z-index: 1 which is the only allowed local override within a Layer stacking context. Starts as warn severity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
match[1] is string | undefined, default to empty string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22592f2 to
981a0b3
Compare
f90324e to
cf1cede
Compare
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
no-z-indexrule ineslintPluginScrapsz-indexin CSS,zIndexin style objects, andzIndexJSX propsz-index: 1/zIndex: 1as the approved local override within a Layerwarn— will promote toerrorafter cleanup is complete🥞 Layer Primitive Series
nm/zindex/layer-primitive— Layer component + hooksnm/zindex/dom-order— DOM restructuring for paint-order stackingnm/zindex/wire-portals— Wire portal consumers to Layer outletsnm/zindex/remove-structural-zindex— Remove structural z-index refsnm/zindex/remove-portal-zindex— Remove portal z-index refsnm/zindex/remove-local-zindex— Replace local z-index refs with bare z-index: 1nm/zindex/deprecate-zindex— Deprecate theme.zIndex scalenm/zindex/lint-ban— Lint rule banning z-index/zIndex ← this PRnm/zindex/final-cleanup— Remove theme.zIndex entirelyTest plan
pnpm test-ci static/eslint/eslintPluginScraps/src/rules/no-z-index.spec.tsz-index: 1is not flaggedz-index: 10IS flagged as warning