Skip to content

lint: allow skuba.template.js in template repositories#2515

Open
KSHITIZ6341 wants to merge 1 commit into
seek-oss:mainfrom
KSHITIZ6341:fix/template-repo-lint
Open

lint: allow skuba.template.js in template repositories#2515
KSHITIZ6341 wants to merge 1 commit into
seek-oss:mainfrom
KSHITIZ6341:fix/template-repo-lint

Conversation

@KSHITIZ6341

@KSHITIZ6341 KSHITIZ6341 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow no-skuba-template-js to pass in source template repositories that do not have package.json#skuba metadata
  • preserve the existing incomplete-template error for generated projects
  • cover both lint and format modes and add a patch changeset

Fixes #1379.

Good catch by @72636c: source templates intentionally retain skuba.template.js, while generated projects receive package.json#skuba metadata during skuba init.

Root cause

The internal lint treated the presence of skuba.template.js as evidence of an incomplete generated project in every repository. That same file is expected in source template repositories, so linting skuba's templates produced a false positive.

The rule now uses the consumer manifest metadata written during project initialisation to distinguish generated projects from source templates before checking for the template file.

Compatibility

There is no API change. Generated projects with package.json#skuba continue to fail lint when a leftover skuba.template.js is present; source template repositories without that metadata now pass.

Checks

  • pnpm format
  • pnpm lint
  • pnpm build
  • pnpm test (67 files, 846 tests)
  • pnpm exec vitest run src/cli/lint/internalLints/noSkubaTemplateJs.test.ts (6 tests)
  • pnpm --filter '!./template/**' test:ci
  • pnpm test:template greeter
  • pnpm test:template oss-npm-package

The full root pnpm test:ci run passed 867 of 869 tests locally. Two format.int.test.ts snapshots differed only in ANSI colour codes under the local terminal and Node 24.14.0; the repository targets Node 24.18 and CI will provide the authoritative integration result.

@KSHITIZ6341
KSHITIZ6341 requested a review from a team as a code owner July 11, 2026 18:42
@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce60264

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
skuba Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

no-skuba-template-js should pass on template repos

1 participant