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

Consider ways to avoid conflicts with Jest snapshots for external tools (like GitHub Linguist) #425

Open
spenserblack opened this issue Nov 14, 2023 · 0 comments

Comments

@spenserblack
Copy link

Right now insta's snapshot files share an extension with Jest's snapshot files. This is a low priority issue, more of a small annoyance than a problem, but this causes GitHub (via linguist) to detect all of insta's snapshots as Jest snapshots, and apply invalid syntax highlighting. If you ever plan on having a breaking change, perhaps you'd want to transition over to using a new extension, like .insta, to make it easier for tools to know that Insta snapshots are not Jest snapshots.

On the other side of things, one might consider registering insta snapshots as a language for GitHub to support, and adding a heuristic (perhaps the front matter can be used?) to help differentiate them.

Right now, as a workaround, I add the following to .gitattributes to remove any awkward syntax highlighting and inaccurate language statistics.

*.snap linguist-language=Text
@spenserblack spenserblack changed the title Consider using a different extension than .snap Consider ways to avoid conflicts with Jest snapshots Nov 14, 2023
@spenserblack spenserblack changed the title Consider ways to avoid conflicts with Jest snapshots Consider ways to avoid conflicts with Jest snapshots for external tools (like GitHub Linguist) Nov 14, 2023
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

No branches or pull requests

1 participant