Skip to content
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: markdown output #94

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: markdown output #94

wants to merge 3 commits into from

Conversation

charislam
Copy link
Collaborator

Add a Markdown output format. This is useful for displaying in GitHub comments, for example.

The output has the following format:

# supa-mdx-lint results

## test.md

```
1 | # Hello World
2 | 

```
This is an error

### Recommendations

1. Replace the text from row 1, column 9 to row 1, column 14 with Friend
2. Replace the text from row 1, column 9 to row 1, column 14 with Neighbor
3. Insert the following text at row 1, column 14:  and Universe

Add a Markdown output format. This is useful for displaying in GitHub comments, for example.

The output has the following format:

# supa-mdx-lint results

## test.md

```
1 | # Hello World
2 | 

```
This is an error

### Recommendations

1. Replace the text from row 1, column 9 to row 1, column 14 with Friend
2. Replace the text from row 1, column 9 to row 1, column 14 with Neighbor
3. Insert the following text at row 1, column 14:  and Universe
Output format is an enum, which is not particularly useful, since we want it to be extendable by users of the library (when we clean up the API). Make it a trait instead.
Markdown output format should also output the lint summary:

```
## Summary

- 🤖 1 file linted
- 🚨 1 errors
- 🔔 0 warnings
```

Refactor the summary calculation out of the output::pretty module to support this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant