-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add new rule no-at-ember-render-modifiers
#2554
Merged
bmish
merged 10 commits into
ember-template-lint:master
from
NullVoxPopuli:no-at-ember-render-modifiers
Jun 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4a659ac
Add no-@ember/render-modifiers
NullVoxPopuli d01b765
Update tests
NullVoxPopuli 8f568a4
Apply suggestions from code review
lin-ll 069fd65
Update tests
NullVoxPopuli eb596d6
Use modifier node instead of element node
NullVoxPopuli 32a257d
Update docs
NullVoxPopuli b0a5096
Update readme
NullVoxPopuli d3acdaa
Remove second argument to matchInlineSnapshot
NullVoxPopuli 5b99d5b
Run jest in watch mode, commit changes
NullVoxPopuli c9b161b
fix snapshots
bmish File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's some old leftover snapshots in these tests. There should only be one arg to
toMatchInlineSnapshot
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lint prevented from using a string, so I had to change to a real object.
then, when jest was running, it updated the string stuff after success -- the string part is the real snapshot persisted by jest, and the js object is the "expected" and helps out with the diff and generated the snapshot if the actual matches the expected.
Is this not how it's supposed to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jest's auto-updating of inline snapshots is buggy. It left the old snapshot in there. Just clear out the snapshots and let it regenerate without the extra arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look buggy to me -- what do you mean?
looks up to date.
are you looking at the full PR diff, rather than the commit this thread started on? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two arguments passed to
toMatchInlineSnapshot
in your code. There should only be one. One is a duplicate of the other. You need to delete the arguments totoMatchInlineSnapshot
and re-run jest to regenerate the snapshots.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if I do that, jest adds the second argument back -- no diff is seen when doing
git status
/git diff
.To prove, I've added two commits:
diff:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing both args was necessary before regenerating. I just pushed the fix for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! tho, now I don't know why the lint rule I was seeing isn't triggering 😅
(It was a jest one, and why what happened even happened in the first place)