Skip to content

Commit

Permalink
Mention --fix bug in comment (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg authored Aug 21, 2021
1 parent b5f0a55 commit 7156ef0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rules/expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ function validate(context: TSESLint.RuleContext<MessageIds, [Options]>, options:
let applied = false;
return {
range: [start, start],
// Trick: Function `fix` is ALWAYS run, and result is collected. However RuleFix objects are only read if `--fix` is passed
// Bug: previously, ESLint would only read RuleFix objects if `--fix` is passed. Now it seems to no matter what.
// TODO: See if we can only update snapshots if `--fix` is passed?
// See: https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/issues/14
get text() {
if (!applied) {
// Make sure we update snapshot only on first read of this object
Expand Down

0 comments on commit 7156ef0

Please sign in to comment.