Skip to content

fix(linting): add missing tsc project references between lint packages - #5184

Merged
odinr merged 1 commit into
mainfrom
fix/linting-tsconfig-references
Jul 30, 2026
Merged

fix(linting): add missing tsc project references between lint packages#5184
odinr merged 1 commit into
mainfrom
fix/linting-tsconfig-references

Conversation

@odinr

@odinr odinr commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Why

The release job for PR #5166 failed partway through with:

src/index.ts(16,28): error TS2307: Cannot find module '@equinor/fusion-framework-lint-core' or its corresponding type declarations.

Root cause: packages/linting/{cli,lsp,config,rules}/tsconfig.json were missing TypeScript project references to their workspace dependencies. Local/full monorepo builds masked this (dist output from a previous full build was already present), but npm publish's per-package prepack script runs tsc -b in isolation, which failed to resolve types for packages it hadn't been told to build first.

Impact of the failure: git tags were pushed for all 23 packages in the release, but only 5 actually published to npm (fusion-imports, fusion-load-env, fusion-log, vite-plugin-markdown, vite-plugin-routes-dsl). The remaining 18 — including @equinor/fusion-framework-react-router@2.4.0 and @equinor/fusion-framework-cli@15.2.2 — are 404 on the registry despite the tags existing.

What

Added references entries:

  • lint-ruleslint-core
  • lint-configlint-core, lint-rules
  • fusion-lint (cli) → lint-core, lint-config
  • lint-lsplint-core, lint-config

(fusion-ts-lint-vscode uses tsc --noEmit and doesn't import lint-core/config types directly, so it didn't need a reference.)

Validation

  • Cleaned all dist/.tsbuildinfo output and ran tsc -b --force for each of lint-core, lint-rules, lint-config, fusion-lint, lint-lsp individually (simulating the isolated prepack build) — all succeed and correctly build their dependencies transitively.
  • fusion-ts-lint-vscode tsc --noEmit — clean.
  • pnpm exec biome lint packages/linting — 98 files, no issues.
  • npx vitest run --project '*lint*' — 22 test files, 289 tests, all passing.

Next step after merge

Once this merges and versions/publishes cleanly, the 18 packages that were tagged but never published in the PR #5166 release will need a follow-up release to actually reach npm.

Without these references, tsc -b couldn't resolve @equinor/fusion-framework-lint-core / lint-config types when a package was built in isolation (as happens during npm publish's prepack step). This caused the publish job for PR #5166 to fail partway through, leaving react-router@2.4.0, the CLI, and most other packages tagged but never published to npm.
@odinr
odinr requested a review from a team as a code owner July 30, 2026 11:29
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ec7386

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

This PR includes changesets to release 4 packages
Name Type
@equinor/fusion-lint Patch
@equinor/fusion-framework-lint-lsp Patch
@equinor/fusion-framework-lint-config Patch
@equinor/fusion-framework-lint-rules 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

@github-actions github-actions Bot added the 🐞 bug Something isn't working label Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 65.5% 3094 / 4723
🔵 Statements 64.9% 3715 / 5724
🔵 Functions 50.61% 1072 / 2118
🔵 Branches 55.02% 1697 / 3084
File CoverageNo changed files found.
Generated in workflow #15031 for commit 0ec7386 by the Vitest Coverage Report Action

@odinr
odinr merged commit 19e0636 into main Jul 30, 2026
9 checks passed
@odinr
odinr deleted the fix/linting-tsconfig-references branch July 30, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant