microsoft / microsoft/TypeScript
SARIF output for tsc failures
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
🔍 Search Terms
sarif
✅ Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ Suggestion
Today the @typescript-eslint/eslint-plugin plugin will not output errors that happen during compile time. This is by design.
So in my CI (Github Actions) I use eslint but I also need to run a tsc --noEmit in order to check compile-time errors.
Ok so far. The pipeline will fail and PR merge will be prevented.
Let's make the developer experience better. Today, in case of a failure in tsc --noEmit, the developer will need to read the step logs to see the failures of the command.
ESlint already supports the @microsoft/eslint-formatter-sarif to output SARIF format outputs in case of failures and github can take those failures and beautifully display them in the PR for the developer. Link to the Github feature. I already use that for eslint and the typescript plugin.
My feature request is for tsc CLI to have same functionality and output SARIF format files in the output if requested. This can be a flag or implement an interface where output formatters can be implemented separately like ESlint.
📃 Motivating Example
This feature improves the developer experience around the git workflow in Github and in any other version control system.
💻 Use Cases
Showed in the suggestion
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tsc --noEmit command path and the existing @microsoft/eslint-formatter-sarif workflow described in the issue. Clarify whether the intended scope is a built-in flag or a formatter interface, then define completion as SARIF output that GitHub can display for compile-time failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100