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

ci: add markdownlint config file and generate/lint component docs #7887

Merged
merged 6 commits into from
Sep 28, 2023

Conversation

benelan
Copy link
Member

@benelan benelan commented Sep 26, 2023

Related Issue: #7662

Summary

  • Add project markdownlint config
  • Set rules for project consistency (versus the default file consistency)
  • Generate component READMEs
  • Lint markdown files and fix some issues manually

@benelan benelan changed the title Benelan/fix markdown linting ci: add markdownlint config file and generate/lint docs Sep 26, 2023
@benelan benelan changed the title ci: add markdownlint config file and generate/lint docs ci: add markdownlint config file and generate/lint component docs Sep 26, 2023
@github-actions github-actions bot added the chore Issues with changes that don't modify src or test files. label Sep 26, 2023
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Awesome 👏

Hopefully we don't have to use the disable/ignore comments too often.

@@ -17,9 +17,11 @@ A child component of `calcite-accordion`, where some behavior is inherited from

## Slots

| Slot | Description |
| ---- | ----------------------------------------------------------------------------- |
| | A slot for adding custom content, including nested `calcite-accordion-item`s. |
Copy link
Member

Choose a reason for hiding this comment

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

These are all generated by Stencil, so does the linter "fix" these after a stencil build? Or should we ignore the readme files inside of components?

Copy link
Member Author

@benelan benelan Sep 28, 2023

Choose a reason for hiding this comment

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

FWIW we do have some manually written sections above the autogenerated part of the component readmes.

I'd prefer if we let the linter make some consistency tweaks after Stencil generates the documentation for now. But I'll keep an eye on the doc update CI and ignore the component readmes if there are any more linting errors.

When I have a little extra time I still plan on reworking our internal documentation setup. One of the ideas I have involves taking advantage of the component readmes more and moving utils to their own folders with their own readmes.

If we do that, it would be nice if the component readmes could be linted w/o the autogenerated part causing issues.

Hopefully we don't have to use the disable/ignore comments too often.

Yeah we should only use ignore comments for auto-generated content like the TOCs and extreme edge cases. The only reason I added those TOCs was to replace the ones that were hand made and out of date. But we could also remove them completely if they aren't necessary.

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

✨💅✨

@benelan benelan added the skip visual snapshots Pull requests that do not need visual regression testing. label Sep 28, 2023
@benelan benelan merged commit d20b36c into main Sep 28, 2023
13 checks passed
@benelan benelan deleted the benelan/fix-markdown-linting branch September 28, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issues with changes that don't modify src or test files. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants