Skip to content

Conversation

@hanna-skryl
Copy link
Collaborator

Closes #1217

  • Add support for multiple tsconfig paths in the TypeScript plugin
  • Add tsconfigFromAllNxProjects helper to auto-discover tsconfigs in Nx workspaces
  • Use the Nx helper in the Code PushUp preset
  • Update README documentation

@hanna-skryl hanna-skryl self-assigned this Jan 22, 2026
@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling 🧩 typescript-plugin TypeScript plugin labels Jan 22, 2026
@nx-cloud
Copy link

nx-cloud bot commented Jan 22, 2026

View your CI Pipeline Execution ↗ for commit 6122c13

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ✅ Succeeded 5s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 35s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 13m 17s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 52s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-22 23:24:05 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 22, 2026

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1229

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1229

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1229

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1229

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1229

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1229

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1229

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1229

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1229

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1229

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1229

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1229

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1229

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1229

commit: 6122c13

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 725a1d4 with previous commit d3230f1.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 36 🔴 28 ↓ −8.5
Security 🟡 51 🔴 47 ↓ −4.2
Documentation 🔴 42 🔴 42 ↑ +0.1
Code coverage 🟢 92 🟢 93 ↑ +0.1
Bug prevention 🟡 75 🟡 75 ↓ −0.1
Axe Accessibility 🟡 88 🟡 88 ↓ −0.1
Code style 🟢 100 🟢 100
Updates 🟡 78 🟡 78
Type Safety 🟡 67 🟡 67
Miscellaneous 🟡 67 🟡 67
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👍 2 groups improved, 👎 2 groups regressed, 👍 5 audits improved, 👎 7 audits regressed, 18 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 36 🔴 28 ↓ −8.5
JS packages npm audit 🟡 51 🔴 47 ↓ −4.2
JSDocs coverage Documentation coverage 🔴 42 🔴 42 ↑ +0.1
Code coverage Code coverage metrics 🟢 92 🟢 93 ↑ +0.1

30 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Initial server response time was short 🟥 Root document took 600 ms 🟩 Root document took 510 ms ↓ −14.9 %
Lighthouse Speed Index 🟥 6.2 s 🟥 11.3 s ↑ +84.3 %
Lighthouse First Contentful Paint 🟥 3.0 s 🟥 4.0 s ↑ +31.5 %
Lighthouse Total Blocking Time 🟥 2,080 ms 🟥 6,400 ms ↑ +208.3 %
Lighthouse Time to Interactive 🟥 13.3 s 🟥 16.9 s ↑ +27.5 %
JS packages Vulnerabilities for npm prod dependencies. 🟨 10 vulnerabilities (2 high, 1 moderate, 7 low) 🟨 11 vulnerabilities (2 high, 2 moderate, 7 low) ↑ +10 %
JSDocs coverage Variables coverage 🟥 268 undocumented variables 🟥 268 undocumented variables  +0 %
JSDocs coverage Functions coverage 🟥 577 undocumented functions 🟥 581 undocumented functions ↑ +0.7 %
JSDocs coverage Types coverage 🟥 268 undocumented types 🟥 271 undocumented types ↑ +1.1 %
Code coverage Function coverage 🟩 94.3 % 🟩 94.3 % ↑ +0.1 %
Code coverage Branch coverage 🟨 89 % 🟨 89 % ↓ −0.1 %
Code coverage Line coverage 🟩 92.3 % 🟩 92.3 % ↑ +0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,104 KiB 🟩 Total size was 2,087 KiB ↓ −0.8 %
Lighthouse Minimizes main-thread work 🟥 9.7 s 🟥 21.6 s ↑ +121.8 %
Lighthouse JavaScript execution time 🟥 4.5 s 🟥 9.3 s ↑ +107.2 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +27.5 %
Lighthouse Largest Contentful Paint 🟥 11.5 s 🟥 14.4 s ↑ +26 %
Lighthouse Max Potential First Input Delay 🟥 990 ms 🟥 3,540 ms ↑ +257.9 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 95 KiB 🟥 Potential savings of 125 KiB ↑ +73.3 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 83 KiB 🟥 Potential savings of 88 KiB ↓ −33.3 %
Lighthouse Server Backend Latencies 🟩 690 ms 🟩 740 ms ↑ +6.9 %
Lighthouse Avoids an excessive DOM size 🟥 2,403 elements 🟥 2,390 elements ↓ −0.5 %
TypeScript Semantic errors 🟥 25 errors 🟥 36 errors ↑ +44 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 226 KiB 🟥 Potential savings of 225 KiB ↓ −0.7 %
JS packages Outdated npm dev dependencies. 🟨 56 outdated package versions (29 major, 19 minor, 8 patch) 🟨 62 outdated package versions (29 major, 25 minor, 8 patch) ↑ +10.7 %
JS packages Vulnerabilities for npm dev dependencies. 🟥 43 vulnerabilities (3 critical, 23 high, 8 moderate, 9 low) 🟥 47 vulnerabilities (3 critical, 10 high, 31 moderate, 3 low) ↑ +9.3 %
JS packages Outdated npm prod dependencies. 🟨 15 outdated package versions (5 major, 8 minor, 2 patch) 🟨 18 outdated package versions (5 major, 11 minor, 2 patch) ↑ +20 %
TypeScript Syntax errors 🟥 5 errors 🟥 3 errors ↓ −40 %
Lighthouse Network Round Trip Times 🟩 0 ms 🟩 10 ms ↑ +26.6 %

649 other audits are unchanged.

@hanna-skryl hanna-skryl force-pushed the typescript-plugin-multi-tsconfig branch from b9c748a to 8f419a0 Compare January 22, 2026 22:46
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 725a1d4 with previous commit d3230f1.

💼 Project plugin-typescript

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟡 87 🟡 89 ↑ +2.5
Documentation 🟡 73 🟡 74 ↑ +0.3

4 other categories are unchanged.

👍 2 groups improved, 👍 4 audits improved, 👎 1 audit regressed, 1 audit changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟡 87 🟡 89 ↑ +2.5
JSDocs coverage Documentation coverage 🟡 73 🟡 74 ↑ +0.3

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Variables coverage 🟥 11 undocumented variables 🟥 11 undocumented variables  +0 %
Code coverage Function coverage 🟨 88.9 % 🟩 92.3 % ↑ +3.8 %
JSDocs coverage Functions coverage 🟨 9 undocumented functions 🟥 13 undocumented functions ↑ +44.4 %
Code coverage Branch coverage 🟨 80.2 % 🟨 81.6 % ↑ +1.7 %
Code coverage Line coverage 🟩 95.5 % 🟩 95.7 % ↑ +0.2 %
JSDocs coverage Types coverage 🟥 8 undocumented types 🟥 11 undocumented types ↑ +37.5 %

438 other audits are unchanged.

💼 Project create-cli

😟 Code PushUp report has regressed.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟢 96 🟢 96 ↓ −0.2

5 other categories are unchanged.

👎 1 group regressed, 👎 1 audit regressed

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟢 96 🟢 96 ↓ −0.2

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟨 88.2 % 🟨 87.5 % ↓ −0.8 %

443 other audits are unchanged.

💼 Project utils

😟 Code PushUp report has regressed.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Documentation 🔴 45 🔴 45 ↓ −0.1

5 other categories are unchanged.

👎 1 group regressed

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
JSDocs coverage Documentation coverage 🔴 45 🔴 45 ↓ −0.1

14 other groups are unchanged.

🛡️ Audits

All of 444 audits are unchanged.


11 other projects are unchanged.

@hanna-skryl hanna-skryl force-pushed the typescript-plugin-multi-tsconfig branch from 8f419a0 to 6122c13 Compare January 22, 2026 23:06
@hanna-skryl hanna-skryl marked this pull request as ready for review January 22, 2026 23:35
Comment on lines +7 to +15
/**
* TypeScript config patterns to look for in each project.
*/
const TSCONFIG_PATTERNS = new Set([
'tsconfig.lib.json',
'tsconfig.spec.json',
'tsconfig.test.json',
'tsconfig.app.json',
]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the VSCode Material Icon Theme, there are a lot more tsconfig file names in common use.

https://github.com/material-extensions/vscode-material-icon-theme/blob/e6bc94766159101048d2503314357500eb4d2659/src/core/icons/fileIcons.ts#L2546-L2578

Moreover, your list is missing tsconfig.json!

I suggest we match any file named tsconfig.json or tsconfig.*.json, so that we don't have to maintain a long list.

Comment on lines +17 to +33
/**
* Resolves the cached project graph for the current Nx workspace.
* Tries to read from cache first, falls back to async creation.
*/
async function resolveCachedProjectGraph() {
const { readCachedProjectGraph, createProjectGraphAsync } = await import(
'@nx/devkit'
);
try {
return readCachedProjectGraph();
} catch (error) {
logger.warn(
`Could not read cached project graph, falling back to async creation.\n${stringifyError(error)}`,
);
return await createProjectGraphAsync({ exitOnError: false });
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could move this method into @code-pushup/utils (adding @nx/devkit as an optional peer dependency)? It's used in other packages as well.

Comment on lines +35 to +40
const diagnostics = [
...getTypeScriptDiagnostics({ tsconfig: config }),
].map(diag => ({
code: diag.code,
issue: getIssueFromDiagnostic(diag),
}));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be any need to clone the array:

Suggested change
const diagnostics = [
...getTypeScriptDiagnostics({ tsconfig: config }),
].map(diag => ({
code: diag.code,
issue: getIssueFromDiagnostic(diag),
}));
const diagnostics = getTypeScriptDiagnostics({ tsconfig: config }).map(
diag => ({
code: diag.code,
issue: getIssueFromDiagnostic(diag),
}),
);

logger.info(
diagnostics.length === 0
? 'No TypeScript errors found'
: `TypeScript compiler found ${pluralizeToken('diagnostic', diagnostics.length)}`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though that's what it's called in typescript code, for most users (including myself), logging TypeScript compiler found 3 errors would be a lot clearer than TypeScript compiler found 3 diagnostics.

Also, I'd expand the wording a bit, so it's clear we're printing the sum from all projects here.

Suggested change
: `TypeScript compiler found ${pluralizeToken('diagnostic', diagnostics.length)}`,
: `TypeScript compiler found ${pluralizeToken('error', diagnostics.length)} in total`,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling 🧩 typescript-plugin TypeScript plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-project support for TypeScript plugin

3 participants