vercel-labs / vercel-labs/konsistent
Replace `haveType` with filesystem path-kind terminology
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 176
- Forks
- 6
- Avg merge
- 20h 26m
- Merged PRs (30d)
- 11
Description
haveType uses “type” for the file-versus-directory distinction, overloading the TypeScript type vocabulary used throughout the predicate model. This should be resolved first because it blocks a coherent path-versus-file terminology cleanup.
Relevant files:
packages/konsistent/src/config/schema.tspackages/konsistent/src/predicates/have-type.tspackages/konsistent/src/core/runner.tspackages/konsistent/konsistent.schema.jsondocs/reference/predicates.md
Rename the concept and predicate to havePathKind with file and directory as its values, and consistently call the distinction “path kind” in code, schema, diagnostics, and documentation.
Backward compatibility: internal names and documentation can be renamed or removed without compatibility shims. Because this changes the konsistent.json schema, keep haveType working with its existing behavior, mark it deprecated, and emit a non-failing CLI warning whenever it 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
Start by tracing the predicate and configuration definitions in packages/konsistent/src/predicates/have-type.ts and packages/konsistent/src/config/schema.ts, then inspect packages/konsistent/src/core/runner.ts, konsistent.schema.json, and docs/reference/predicates.md. Done means havePathKind uses file and directory with path-kind terminology, while existing haveType behavior remains available as deprecated and produces a non-failing CLI warning.
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
- Clearly specified
- Newbie friendliness
- 65/100