Add No-Inline-Type-Literal ESLint Rule and Apply Across Workspace#126
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 2228cab
☁️ Nx Cloud last updated this comment at |
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.
Description
Introduces a new
workspace/no-inline-type-literalESLint rule that prohibits inline anonymous object type literals at use sites and requires every named-property shape to live as atypealias orinterface. 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 underroadmap/.Type of Change
✨ Feature | ♻️ Refactor | 📝 Docs
Changes Made
workspace/no-inline-type-literalrule intools/eslint-rules/src/rules/no-inline-type-literal.tswith accompanying spec and a documentation page attools/eslint-rules/docs/no-inline-type-literal.md.eslint.base.config.cjsfor**/*.tsand**/*.tsx, with Jest config and spec files exempted.typealiases orinterfaces acrosslibs/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, andtools/eslint-rules.roadmap/phase-1-2-builder-implementation-plan.mddocumenting the planned builder package work.Testing
tools/eslint-rules/src/rules/no-inline-type-literal.spec.tscover positional, return-type, cast, generic, union/intersection, satisfies, generic-constraint, and nested-literal cases, plus exempt forms (RHS oftype,interfacebodies, empty{}, index-signature-only, call-signature-only).Checklist
npm run commitfor conventional commit messagesAI Assistance
GitHub Copilot was used to generate this PR description.
📝 CLA Requirement
By submitting this pull request, you acknowledge that:
For more information, see our Contributing Guide.
Thank you for contributing to hyperfrontend! 🚀