From 7497a524b5e04ded495d59aef22f33e6622d3e2d Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Tue, 22 Oct 2024 14:42:48 -0400 Subject: [PATCH] Clarify that suggestions should not be disabled. Autofixes are "demoted" to suggestions. --- designs/2024-per-rule-autofix-configuration/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designs/2024-per-rule-autofix-configuration/README.md b/designs/2024-per-rule-autofix-configuration/README.md index 79f2cbeb..8876ee50 100644 --- a/designs/2024-per-rule-autofix-configuration/README.md +++ b/designs/2024-per-rule-autofix-configuration/README.md @@ -53,6 +53,8 @@ export default [ ] ``` +The fix should still exist as a suggestion. Only autofixing (when running `eslint --fix` or editor action on save) should be disabled. + I think that disabling autofixes for a rule that doesn't have any or doesn't exist should be a no-op. Just like disabling a rule that doesn't exist. The reasoning being that this allows much more flexible shareable configurations. It's still an open question whether *enabling* autofixes for a rule that doesn't exist should warn, error or be silent. @@ -121,7 +123,6 @@ Another approach I can think of is to encode that in the rule config itself. Som you can remove this section. --> - Where exactly should the documentation go ? -- Should the value be more than a boolean ? (for example if we want to affect offering suggestions in editors) - What should the key for the new configuration be ? - What happens if we mark a rule as "should be autofixed" but there's no fix available? Warn? Silently ignore? - Whether *enabling* autofixes for a rule that doesn't exist should warn, error or be silent.