-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: typescript plugin poc implementation #902
Open
BioPhoton
wants to merge
109
commits into
main
Choose a base branch
from
plugin-typescript
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,492
−7
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
github-actions
bot
added
📖 Project documentation
improvements or additions to the project documentation
🔬 testing
writing tests
🛠️ tooling
labels
Dec 23, 2024
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. |
BioPhoton
changed the title
feat: add TypeScript plugin
feat: typescript plugin poc implementation
Dec 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🧩 eslint-plugin
📖 Project documentation
improvements or additions to the project documentation
🔬 testing
writing tests
🛠️ tooling
🧩 utils
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
syntax-errors
,semantic-errors
,internal-errors
Suggestions Group (1)suggestions
3XXX[1]configuration-errors
language-service-errors
,unknown-codes
This PR includes:
Proposed PR delivery:
@code-pushup/utils
CONTRIBUTING.md
Alternatives
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