Skip to content

Add No-Inline-Type-Literal ESLint Rule and Apply Across Workspace#126

Merged
AndrewRedican merged 14 commits into
mainfrom
week-2026-04-27_1
Apr 28, 2026
Merged

Add No-Inline-Type-Literal ESLint Rule and Apply Across Workspace#126
AndrewRedican merged 14 commits into
mainfrom
week-2026-04-27_1

Conversation

@AndrewRedican
Copy link
Copy Markdown
Owner

Description

Introduces a new workspace/no-inline-type-literal ESLint rule that prohibits inline anonymous object type literals at use sites and requires every named-property shape to live as a type alias or interface. The rule is enabled across the workspace, and every pre-existing inline literal has been extracted into a declared type so JSDoc-coverage rules can decorate it. Also lands the Phase 1–2 builder package implementation plan under roadmap/.

Type of Change

✨ Feature | ♻️ Refactor | 📝 Docs

Changes Made

  • Add workspace/no-inline-type-literal rule in tools/eslint-rules/src/rules/no-inline-type-literal.ts with accompanying spec and a documentation page at tools/eslint-rules/docs/no-inline-type-literal.md.
  • Wire the rule into eslint.base.config.cjs for **/*.ts and **/*.tsx, with Jest config and spec files exempted.
  • Refactor inline type literals into declared type aliases or interfaces across libs/network-protocol, libs/nexus, libs/project-scope, libs/versioning, libs/utils/data, libs/utils/json, libs/utils/string, apps/docs-site, tools/app, tools/package, and tools/eslint-rules.
  • Add roadmap/phase-1-2-builder-implementation-plan.md documenting the planned builder package work.

Testing

  • New unit tests for the rule in tools/eslint-rules/src/rules/no-inline-type-literal.spec.ts cover positional, return-type, cast, generic, union/intersection, satisfies, generic-constraint, and nested-literal cases, plus exempt forms (RHS of type, interface bodies, empty {}, index-signature-only, call-signature-only).
  • Repository lint run confirms the rule passes across the touched libraries, apps, and tools after the refactors.

Checklist

  • I have performed a self-review of my code
  • I have added/updated tests as needed
  • I have updated relevant documentation
  • I have used npm run commit for conventional commit messages

AI Assistance

GitHub Copilot was used to generate this PR description.


📝 CLA Requirement

By submitting this pull request, you acknowledge that:

  • You have read and agree to sign our Contributor License Agreement (CLA)
  • The CLA Assistant bot will automatically check your signature status
  • If you haven't signed yet, the bot will provide instructions in the comments
  • By signing, you grant the project maintainer exclusive rights to your contributions

For more information, see our Contributing Guide.


Thank you for contributing to hyperfrontend! 🚀

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-site Ready Ready Preview, Comment Apr 28, 2026 8:59pm

Request Review

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 28, 2026

View your CI Pipeline Execution ↗ for commit 2228cab

Command Status Duration Result
nx run-many -t=e2e --projects=docs-site,@hyperf... ✅ Succeeded 3m 7s View ↗
nx run-many -t=build --projects=docs-site,@hype... ✅ Succeeded 2m 8s View ↗
nx run-many -t=lint --projects=docs-site,@hyper... ✅ Succeeded 1m 24s View ↗
nx run-many -t=typecheck --projects=docs-site,@... ✅ Succeeded 17s View ↗
nx run-many -t=test --projects=docs-site,@hyper... ✅ Succeeded 4s View ↗
nx run-many -t=format:check --projects=docs-sit... ✅ Succeeded <1s View ↗
nx version-check lib-function-utils ✅ Succeeded 1s View ↗
nx version-check lib-questions ✅ Succeeded 1s View ↗
Additional runs (15) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-04-28 21:09:28 UTC

@AndrewRedican AndrewRedican merged commit 2ea4139 into main Apr 28, 2026
15 checks passed
@AndrewRedican AndrewRedican deleted the week-2026-04-27_1 branch April 28, 2026 21:13
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