Skip to content

fix(konsistent): fix importFrom predicate to distinguish between exact vs sub match imports#48

Merged
felixarntz merged 2 commits into
mainfrom
fix/import-from
Jul 6, 2026
Merged

fix(konsistent): fix importFrom predicate to distinguish between exact vs sub match imports#48
felixarntz merged 2 commits into
mainfrom
fix/import-from

Conversation

@felixarntz

Copy link
Copy Markdown
Collaborator

Pull Request Description

Fixes importFrom so package roots only match exact module specifiers by default, while explicit trailing /* handles subpath checks. It also allows configs to require or forbid multiple import sources in one predicate.

Relevant technical choices

  • Changed importFrom matching to exact equality unless the configured source ends in /*.
  • Added string[] support in config schemas, placeholder validation, and mustNot item-level checks.
  • Updated unit tests, e2e fixtures, generated schemas, and docs for exact, wildcard, and array behavior.

Checklist

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated
  • A changeset has been added (run pnpm changeset in the project root if package files were modified)
  • I have reviewed this pull request (self-review)

@felixarntz
felixarntz merged commit b424bab into main Jul 6, 2026
7 checks passed
@felixarntz
felixarntz deleted the fix/import-from branch July 6, 2026 15:27
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