-
Notifications
You must be signed in to change notification settings - Fork 16
feat: typescript plugin poc implementation #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Matěj Chalk <[email protected]>
Co-authored-by: Matěj Chalk <[email protected]>
Co-authored-by: Matěj Chalk <[email protected]>
Co-authored-by: Matěj Chalk <[email protected]>
Co-authored-by: Matěj Chalk <[email protected]>
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared target commit 97d1de7 with source commit c219602. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories(*) New category. 👎 2 groups regressed, 👍 1 audit improved, 👎 6 audits regressed, 11 audits changed without impacting score🗃️ Groups
15 other groups are unchanged. 🛡️ Audits
569 other audits are unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting stuff 🚀
This PR includes helper for the TypeScript plugin #902
# Conflicts: # packages/plugin-typescript/eslint.config.js # packages/plugin-typescript/package.json # packages/plugin-typescript/src/index.ts # packages/plugin-typescript/src/lib/constants.ts # packages/plugin-typescript/vite.config.integration.ts # packages/plugin-typescript/vite.config.unit.ts # packages/utils/src/index.ts # packages/utils/src/lib/types.ts # testing/test-utils/src/lib/utils/logging.ts
# Conflicts: # packages/plugin-typescript/mocks/fixtures/basic-setup/src/6-configuration-errors/ts-6059-file-is-not-under-root-dir.ts # packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.init.json # packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.internal-errors.json # packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.json # packages/plugin-typescript/src/lib/runner/__snapshots__/runner-function-all-audits.json # packages/plugin-typescript/src/lib/runner/runner.integration.test.ts # packages/plugin-typescript/src/lib/runner/runner.ts # packages/plugin-typescript/src/lib/runner/runner.unit.test.ts # packages/plugin-typescript/src/lib/runner/ts-runner.integration.test.ts # packages/plugin-typescript/src/lib/runner/ts-runner.ts # packages/plugin-typescript/src/lib/runner/utils.ts # packages/plugin-typescript/src/lib/runner/utils.unit.test.ts # packages/plugin-typescript/src/lib/types.ts # packages/plugin-typescript/src/lib/utils.ts
# Conflicts: # packages/plugin-eslint/src/lib/runner.integration.test.ts # packages/plugin-typescript/src/lib/schema.ts # packages/plugin-typescript/src/lib/schema.unit.test.ts # packages/plugin-typescript/src/lib/typescript-plugin.ts # packages/plugin-typescript/src/lib/typescript-plugin.unit.test.ts
Closed as implemented |
TypeScript Plugin PoC Implementation
Incremental migration for TypeScript projects
This plugin enables step-by-step adoption of newer TypeScript features while avoiding large-scale refactors.
📝 Related Issue
👉 #901 – TypeScript Plugin Architecture Discussion
🔌 Plugin Overview
Purpose
The plugin enables incremental adoption of TypeScript configurations and helps track regressions while avoiding CI failures.
Key Features:
✅ Extracts Diagnostics: Uses TypeScript’s compiler APIs to analyze diagnostics.
✅ Audit Mapping: Maps diagnostics to audit rules for actionable feedback.
✅ Migration Support: Handles migration via separate configs (
tsconfig.json
,tsconfig.next.json
).✅ Detailed Reports: Provides grouped, actionable error/warning summaries.
Report Summary
Overview of Audit Groups, Audit Counts, and Diagnostic Issue Types.
TypeScript's own guidelines on diagnostic code ranges
syntax-errors
,semantic-errors
,internal-errors
,no-implicit-any
Suggestions Group (1)suggestions
3XXX[1]configuration-errors
language-service-errors
,unknown-codes
This PR includes:
Proposed PR delivery:
@code-pushup/utils
- feat(utils): add string helper #916CONTRIBUTING.md
- test(plugin-typescript-e2e): add basic e2e tests #974Alternatives
ts-2345
.This leads to a huge amount of audits > ~2000 if not reduces to a subset of useful codes, hard to understand audit slug
🧪 How to Test the Plugin
nx code-pushup --onlyPlugins=typescript
to execute the plugin and generate the report.code-pushup/report.md
📊 Visual Examples
🖥️ Dashboard Overview

Central view showing audit results and issue summaries.
📂 Additional Visuals
📸 Expand to View More Visuals
🖥️ Audit Insights 1

Drill-down view for grouped audits and diagnostics.
🖥️ Audit Insights 2

Deeper inspection of diagnostics linked to audits.
🛠️ Code Diagnostics 1

Pinpoint file locations and error lines.
🛠️ Code Diagnostics 2

Detailed breakdown of warnings and errors.
Example Md Report:
Code PushUp Report
🏷 Categories
Typescript
🟡 Score: 85
🛡️ Audits
Semantic-Errors (Typescript)
🟥 19 (score: 0)
Issues
src/module-resolution/ts-2307-module-not-fount.ts
src/strict/no-implicit-this/ts-2683-not-implicit-this.ts
Type 'Number' has no call signatures.
src/strict/strict-function-types/ts-2349-not-callable.ts
src/strict/strict-null-checks/ts-2531-strict-null-checks.ts
src/strict/conditional-types/ts-2367-invalid-condition.ts
📖 Docs
closes #901