eslint.org icon indicating copy to clipboard operation
eslint.org copied to clipboard

Suggestion: [playground]alert item add Disabled button.

Open zhangenming opened this issue 10 months ago • 10 comments

What problem do you want to solve?

we can Disabled an rule quickly.

What do you think is the correct solution?

add Disabled button.

Participation

  • [X] I am willing to submit a pull request for this change.

Additional comments

No response

zhangenming avatar Apr 09 '24 01:04 zhangenming

Thanks for submitting this. While I understand what you're going for, the point of filing an issue is to provide details as to what change you'd like to make and why you'd like to make it. One sentence really isn't enough for us to evaluate.

nzakas avatar Apr 10 '24 18:04 nzakas

what change you'd like to make

add a button like this image

why you'd like to make it.

can quickly remove rules that I know I don't want

zhangenming avatar Apr 11 '24 03:04 zhangenming

Seems reasonable to me, although the button should be labeled "Disable" or maybe "Ignore"?

And not sure if we should just remove it from the configuration or set to "off".

Would like some thoughts from @eslint/eslint-team

nzakas avatar Apr 11 '24 20:04 nzakas

I think the label should be Disable and we should turn it off instead of removing from the config.

snitin315 avatar Apr 14 '24 19:04 snitin315

If we'd add a "Config" button that would scroll to the rule's config, as proposed in https://github.com/eslint/eslint.org/issues/550, then we might not need this button as the user can there easily remove it or set it to "off", whichever they prefer.

mdjermanovic avatar Apr 14 '24 21:04 mdjermanovic

Should we also disable the rule inline with eslint-disable comment or should we rather remove it from the list of selected rules?

harish-sethuraman avatar May 09 '24 17:05 harish-sethuraman

If we'd add a "Config" button that would scroll to the rule's config, as proposed in #550, then we might not need this button as the user can there easily remove it or set it to "off", whichever they prefer.

I think it makes more sense to implement https://github.com/eslint/eslint.org/issues/550, this would solve both issues. See https://github.com/eslint/eslint.org/issues/550#issuecomment-2198431091

snitin315 avatar Jun 30 '24 04:06 snitin315

I think a "Disable" button is a much better user experience if your goal is to disable a rule. Clicking on "config" and then needing to shift focus, then edit the config, then go back to the editor is a lot of steps.

nzakas avatar Jul 01 '24 14:07 nzakas

I too feel the same disable button is better.

I think a "Disable" button is a much better user experience if your goal is to disable a rule. Clicking on "config" and then needing to shift focus, then edit the config, then go back to the editor is a lot of steps.

amareshsm avatar Jul 01 '24 18:07 amareshsm

I think it depends on what use case we want to focus on. If we think that people disabling a rule is the more common case, then it makes sense to have a "Disable" button. If we think that people modifying the rule's config is more common and that disabling is a less common case, then just having a "Config" button makes sense.

nzakas avatar Jul 02 '24 15:07 nzakas