Skip to content

feat: support lintoko in [requirements] for package consumers#598

Open
Kamirus wants to merge 3 commits into
mainfrom
feat/requirements-lintoko
Open

feat: support lintoko in [requirements] for package consumers#598
Kamirus wants to merge 3 commits into
mainfrom
feat/requirements-lintoko

Conversation

@Kamirus

@Kamirus Kamirus commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Packages that ship lintoko rules had no way to tell consumers they need a newer lintoko — rule syntax (#match?, includes, etc.) is versioned, so failures on an old toolchain were opaque.

Before: only moc could be declared under [requirements]; lintoko mismatches surfaced only as cryptic rule errors at lint time.

After: packages can pin a minimum lintoko the same way as moc:

[requirements]
lintoko = "0.10.0"

mops install, mops add, and mops toolchain use warn when the project's lintoko is below a dependency's requirement:

lintoko version does not meet the requirements of my-rules@0.1.0
  Required: >= 0.10.0
  Installed:   0.7.0

Moc and lintoko checks run independently — a missing moc no longer skips lintoko requirement warnings.

Closes #597.

Made with Cursor

Packages shipping lintoko rules can declare a minimum lintoko version so
consumers get a clear warning when their toolchain is too old.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Cursor AI review

👍 APPROVE — looks safe to merge

Category Assessment Details
Summary Adds [requirements].lintoko end-to-end: CLI types/parsing, generalized requirement checks (install/add/toolchain), backend publish validation, docs, and a focused test.
Code Quality Refactors check-requirements.ts into a reusable tool loop instead of duplicating moc logic; new get-lintoko-version.ts follows existing semver helper patterns.
Consistency Matches the existing moc requirements UX (warning format, semver >= semantics, call sites on install/add/toolchain); toolchain update now also runs checks like toolchain use already did.
Security No auth, signing, or registry-protocol changes; only expands allowed requirement names in config validation.
Tests New integration test covers the primary lintoko warning path via mops toolchain use; assertions are targeted, not snapshot noise.
Maintainability cli/types.ts, docs/docs/09-mops.toml.md, and cli/CHANGELOG.md are updated in sync with the schema change.

Verdict

Decision: APPROVE
Risk: Low
Reason: This is a contained, additive feature that mirrors the established moc requirements flow with aligned backend validation, docs, and tests. I found no correctness regressions or production-risk issues introduced by the diff.


Generated for commit 70d643b

Kamirus and others added 2 commits June 26, 2026 11:21
Co-authored-by: Cursor <cursoragent@cursor.com>
Unlike moc, lintoko has no dfx fallback. Requirements checks should
reflect the project's pinned toolchain, not whatever happens to be on PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

feat: support lintoko in [requirements] for package consumers

1 participant