Skip to content

fix(lint): detect over-constrained clip positioning#2219

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/clip-inset-position-lint
Open

fix(lint): detect over-constrained clip positioning#2219
miguel-heygen wants to merge 1 commit into
mainfrom
fix/clip-inset-position-lint

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Custom-positioned .clip elements now receive a lint warning before inherited inset: 0 silently stretches them into giant shapes. The rule identifies auto-sized clips that retain both horizontal or vertical edges, and points authors to the exact auto resets or explicit dimensions needed. Full-canvas clips and custom clips with the documented resets or dimensions remain clean.

Test plan

  • bun test packages/lint/src — 354 passed
  • bun run --filter @hyperframes/lint typecheck
  • bunx oxfmt --check packages/lint/src/rules/core.ts packages/lint/src/rules/core.test.ts
  • bunx oxlint packages/lint/src/rules/core.ts packages/lint/src/rules/core.test.ts
  • bun run build
  • Reproduced the original fixture through the built CLI and confirmed clip_inset_overconstrained

Compound Engineering
GPT-5_Codex

@github-actions

Copy link
Copy Markdown

Fallow audit report

Found 3 findings.

Details
Severity Rule Location Description
major fallow/high-cognitive-complexity packages/lint/src/rules/core.ts:204 'coreRules' has cognitive complexity 25 (threshold: 15)
minor fallow/high-crap-score packages/lint/src/rules/core.ts:232 '<arrow>' has CRAP score 31.6 (threshold: 30.0, cyclomatic 10)
major fallow/high-crap-score packages/lint/src/rules/core.ts:285 '<arrow>' has CRAP score 56.3 (threshold: 30.0, cyclomatic 14)

Generated by fallow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant