Skip to content

ref(🥞): add no-z-index lint rule banning z-index declarations#115963

Draft
natemoo-re wants to merge 7 commits into
nm/zindex/wire-portalsfrom
nm/zindex/lint-ban
Draft

ref(🥞): add no-z-index lint rule banning z-index declarations#115963
natemoo-re wants to merge 7 commits into
nm/zindex/wire-portalsfrom
nm/zindex/lint-ban

Conversation

@natemoo-re
Copy link
Copy Markdown
Member

@natemoo-re natemoo-re commented May 20, 2026

Summary

  • New no-z-index rule in eslintPluginScraps
  • Bans z-index in CSS, zIndex in style objects, and zIndex JSX props
  • Allows z-index: 1 / zIndex: 1 as the approved local override within a Layer
  • Starts as warn — will promote to error after cleanup is complete

🥞 Layer Primitive Series

Test plan

  • Rule tests pass: pnpm test-ci static/eslint/eslintPluginScraps/src/rules/no-z-index.spec.ts
  • No new lint warnings on clean codebase (after removal PRs merge)
  • z-index: 1 is not flagged
  • z-index: 10 IS flagged as warning

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.59%

@natemoo-re natemoo-re force-pushed the nm/zindex/wire-portals branch from 0e6e40d to 579605a Compare May 21, 2026 13:59
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 825d252 to 77c8a9c Compare May 21, 2026 14:00
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 77c8a9c to 835c0d3 Compare May 21, 2026 14:14
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 835c0d3 to 2b151ad Compare May 21, 2026 17:31
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 2b151ad to fd3852b Compare May 21, 2026 17:35
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from fd3852b to 98dc8a2 Compare May 21, 2026 17:42
@natemoo-re natemoo-re force-pushed the nm/zindex/wire-portals branch from 255dc7c to 97da138 Compare May 26, 2026 17:16
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from a61cbae to de06aab Compare May 26, 2026 17:16
@natemoo-re natemoo-re force-pushed the nm/zindex/wire-portals branch from 97da138 to f0adcb8 Compare May 26, 2026 21:18
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 5a61026 to d04c99e Compare May 26, 2026 21:22
@natemoo-re natemoo-re force-pushed the nm/zindex/wire-portals branch from f0adcb8 to 1d3b325 Compare May 26, 2026 21:59
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from d04c99e to 3e3e962 Compare May 26, 2026 21:59
@natemoo-re natemoo-re force-pushed the nm/zindex/wire-portals branch from 1d3b325 to 471b49d Compare May 26, 2026 22:26
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 3e3e962 to 6f10afb Compare May 26, 2026 22:27
@natemoo-re natemoo-re force-pushed the nm/zindex/lint-ban branch from 6f10afb to 435df52 Compare May 26, 2026 22:46
natemoo-re and others added 7 commits May 28, 2026 12:45
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant