From 0971e469f9a9a8a0e35edb52a9728a95eecc1e7d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 21 Aug 2021 11:28:00 -0400 Subject: [PATCH] Mention --fix bug in comment --- src/rules/expect.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rules/expect.ts b/src/rules/expect.ts index 69f741ad..043364d5 100644 --- a/src/rules/expect.ts +++ b/src/rules/expect.ts @@ -184,7 +184,9 @@ function validate(context: TSESLint.RuleContext, 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