Skip to content

fix: remove redundant type constituents from union types#502

Merged
gka merged 2 commits intomainfrom
fix/no-redundant-type-constituents
Mar 2, 2026
Merged

fix: remove redundant type constituents from union types#502
gka merged 2 commits intomainfrom
fix/no-redundant-type-constituents

Conversation

@ljodea
Copy link
Copy Markdown
Collaborator

@ljodea ljodea commented Feb 27, 2026

Summary

  • Fixes all 11 no-redundant-type-constituents oxlint warnings across 4 files
  • Uses (string & {}) pattern to preserve IDE autocomplete while removing redundant string from unions that already contain string literal subtypes
  • Removes boolean from RawValue | boolean (already included in RawValue)
  • Uses CSS.Property.FontSize<number> generic instead of CSS.Property.FontSize | number
  • Narrows Kernel | stringKernel for private maybeKernel() function

Files changed

  • src/lib/helpers/colors.ts — 4 function signatures
  • src/lib/helpers/group.ts — 1 type annotation
  • src/lib/types/mark.ts — 2 type properties (fontSize, target)
  • src/lib/transforms/density.ts — 1 function signature

Test plan

  • pnpm exec oxlint --type-aware — 0 no-redundant-type-constituents warnings
  • pnpm test — all tests pass
  • pnpm check — 0 svelte-check errors

🤖 Generated with Claude Code

- ColorScheme | string → ColorScheme | (string & {}) to preserve autocomplete
- CSS.Property.FontSize | number → CSS.Property.FontSize<number>
- '_self' | '_blank' | ... | string → ... | (string & {})
- RawValue | boolean → RawValue (boolean already in RawValue)
- Kernel | string → Kernel (private function, string not needed)

Fixes all 11 no-redundant-type-constituents oxlint warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 27, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 64feede
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/69a1f558b1e82000087ade21
😎 Deploy Preview https://deploy-preview-502--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gka gka merged commit 8d13117 into main Mar 2, 2026
9 checks passed
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.

2 participants