eslint-plugin-expect-type icon indicating copy to clipboard operation
eslint-plugin-expect-type copied to clipboard

🐛 Bug: Type snapshots can't infer ESLint fix mode without a process.argv --fix

Open JoshuaKGoldberg opened this issue 1 year ago • 2 comments

Bug Report Checklist

  • [X] I have tried restarting my IDE and the issue persists.
  • [X] I have pulled the latest main branch of the repository.
  • [X] I have searched for related issues and found none that matched my issue.

Expected

As originally reported by #14: type snapshots should update if ESLint is run in --fix mode. For a while they were always being updated (unless disableExpectTypeSnapshotFix was enabled).

Actual

As of #113, type snapshots are only updated if process.argv.includes('--fix'). That doesn't account for programmatic usage of ESLint's Node.js API such as from an editor extension.

Additional Info

No response

JoshuaKGoldberg avatar Dec 19 '23 20:12 JoshuaKGoldberg

☝️

coderaiser avatar Jan 06 '24 11:01 coderaiser

@coderaiser thanks for the suggestion. As much as I love that Antoine de Saint Exupéry quote, this isn't an appropriate place to advertise a neighboring ecosystem project.
As a general rule I don't recommend advertising "competing" (or, as I like to call them, "neighboring") projects for issues that are still new and in-discussion.

JoshuaKGoldberg avatar Jan 09 '24 18:01 JoshuaKGoldberg