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

chore: collapse generated snapshots in PR view by default #6485

Merged

Conversation

Josh-Cena
Copy link
Member

PR Checklist

Overview

Per discussion with @JoshuaKGoldberg. This makes snapshots collapsed just like yarn.lock changes.

@nx-cloud
Copy link

nx-cloud bot commented Feb 17, 2023

☁️ Nx Cloud Report

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

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @Josh-Cena!

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.

@netlify
Copy link

netlify bot commented Feb 17, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit ef78d16
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/63efd9e8323c120008d0bb7b
😎 Deploy Preview https://deploy-preview-6485--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #6485 (ef78d16) into main (c46c793) will increase coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6485      +/-   ##
==========================================
+ Coverage   90.64%   90.66%   +0.02%     
==========================================
  Files         373      374       +1     
  Lines       12751    12823      +72     
  Branches     3752     3777      +25     
==========================================
+ Hits        11558    11626      +68     
  Misses        853      853              
- Partials      340      344       +4     
Flag Coverage Δ
unittest 90.66% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-plugin/src/rules/explicit-function-return-type.ts 97.95% <0.00%> (ø)
packages/eslint-plugin/src/rules/no-mixed-enums.ts 94.44% <0.00%> (ø)

@bradzacher
Copy link
Member

Won't this remove the syntax highlighting in GH because you're losing the language attribute?

I don't know if they should be seen as generated - aside from codebase reactors, we'll really want to be reviewing all of our snapshots as code because they represent the AST output.

I do have an idea for adding snapshot testing to the rule tester as well, so that would be more snapshots to be reviewed.

@Josh-Cena
Copy link
Member Author

Won't this remove the syntax highlighting in GH because you're losing the language attribute?

No it won't. linguist-language and linguist-generated are two orthogonal attributes. You can refer to https://github.com/github/linguist/blob/master/docs/overrides.md

I don't know if they should be seen as generated

You can still view the diff, just that they are collapsed by default. This prevents diffs like #6274 from being unviewable.

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.

As long as syntax highlighting is preserved, I'm fine with auto-collapsing by default. I normally end up doing little console macros to collapse/expand everything anyway.

@bradzacher bradzacher added this pull request to the merge queue Mar 13, 2023
@JoshuaKGoldberg JoshuaKGoldberg removed this pull request from the merge queue due to a manual request Mar 13, 2023
@JoshuaKGoldberg JoshuaKGoldberg merged commit b0adcdb into typescript-eslint:main Mar 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants