vercel-labs / vercel-labs/konsistent

Rename `useDeclarationOrder` to cover declarations and exports

Open
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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.ts
  • packages/konsistent/src/typescript/parser.ts
  • packages/konsistent/src/typescript/types.ts
  • packages/konsistent/src/core/convention-name.ts
  • docs/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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.