vercel-labs / vercel-labs/konsistent
Rename `useDeclarationOrder` to cover declarations and exports
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 176
- Forks
- 6
- Avg merge
- 20h 26m
- Merged PRs (30d)
- 11
Description
useDeclarationOrder checks both local declarations and named export occurrences, so its current name describes only part of the behavior. The replacement name should continue to cover exported and unexported top-level symbols without implying that every occurrence is a declaration.
Relevant files:
packages/konsistent/src/typescript/predicates/use-declaration-order.tspackages/konsistent/src/typescript/parser.tspackages/konsistent/src/typescript/types.tspackages/konsistent/src/core/convention-name.tsdocs/reference/predicates.md
Possible names:
useSymbolOrder— preferred concise umbrella for declarations and exports.useTopLevelSymbolOrder— more explicit about scope.orderSymbols— shorter, but less consistent with the existing predicate naming style.
Backward compatibility: internal names and documentation can be renamed or removed without compatibility shims. In konsistent.json, keep useDeclarationOrder and its existing behavior as deprecated, add the replacement predicate, and emit a non-failing CLI warning whenever the old predicate is used.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read packages/konsistent/src/typescript/predicates/use-declaration-order.ts and trace its registration through parser.ts, types.ts, and core/convention-name.ts. Then inspect docs/reference/predicates.md and konsistent.json to understand the existing name and configuration behavior. Done means the replacement predicate covers declarations and exports, the old name remains deprecated with a non-failing CLI warning, and documentation reflects both names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, documentation, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100