Skip to content

docs: add snapshot-related info sections to the Pull Requests documentation #9302

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

Merged
merged 2 commits into from
Jul 6, 2024

Conversation

alythobani
Copy link
Contributor

@alythobani alythobani commented Jun 7, 2024

PR Checklist

Overview

  • Added "AST Testing" and "Updating Snapshots" sections to the Pull Requests doc
  • Fixed heading levels

🌱

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @alythobani!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Jun 7, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 45700e0
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6663317f20b9fe00083123fb
😎 Deploy Preview https://deploy-preview-9302--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (🔴 down 8 from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Jun 7, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 45700e0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

A great start, thanks! I like the fixing up of header levels and the general explanations. Clear and informative. Nicely done! 🙌


### Updating Snapshots

Jest snapshots are generated for use in some tests, e.g. for [rule schemas](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/tests/schema-snapshots) and [code examples in rule docs](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/tests/docs-eslint-output-snapshots). You may need to re-generate these snapshots after adjusting a rule and/or its documentation, by running the relevant test suite(s) with the `-u` flag:
Copy link
Member

Choose a reason for hiding this comment

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

.../main/...

[Docs] It's best to use commit permalinks, as file intent and/or paths can change over time. E.g. https://github.com/typescript-eslint/typescript-eslint/tree/04990d545fc119329551ae3a55d79dfc0c7bf147/packages/eslint-plugin/tests/schema-snapshots.

Copy link
Member

Choose a reason for hiding this comment

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

@JoshuaKGoldberg I slightly prefer linking to main in this case:

  • If the file is missing, we want to update the docs
  • If we updated the code, we don't want anyone to read outdated code.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I guess that makes sense. I feel more comfortable about these kinds of permalinks when Docusaurus flags on missing links...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to do whatever we think is best here!

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Jun 7, 2024
@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Jun 7, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

✨ looks great to me, thanks!

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jun 29, 2024
@JoshuaKGoldberg JoshuaKGoldberg merged commit 3bb4f1d into typescript-eslint:main Jul 6, 2024
64 of 65 checks passed
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jul 6, 2024

I say, let's just ship 😄. If the repo ever decides on a standardized approach we'd lint for it. Thanks again @alythobani!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: contributing docs should say how to update rule doc code example snapshots
3 participants