You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
*.snaplinguist-language=Text
The text was updated successfully, but these errors were encountered:
spenserblack
changed the title
Consider using a different extension than .snap
Consider ways to avoid conflicts with Jest snapshots
Nov 14, 2023
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
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.The text was updated successfully, but these errors were encountered: