mysticatea / eslint-plugin-eslint-comments

Additional ESLint rules for directive comments of ESLint.
https://mysticatea.github.io/eslint-plugin-eslint-comments/
MIT License
354 stars 44 forks source link

Rule proposal: forced disabling reason #47

Closed dartess closed 4 years ago

dartess commented 4 years ago

copy from the main repository (https://github.com/eslint/eslint/issues/13338)

Please describe what the rule should do:

oblige the developer to explain the reason for disconnecting the linter

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem) [ ] Suggests an alternate way of doing something (suggestion) [ ] Enforces code style (layout) [x] Other (please specify:) — reduce the number of thoughtless shutdowns of the linter; Improve code reading speed by other developers.

Provide 2-3 code examples that this rule will warn about:

// fail
// eslint-disable-next-line no-new
new Swiper(slider);

// ok
// eslint-disable-next-line no-new -- saving the instance is not necessary, since subsequent control of the slider is not needed
new Swiper(slider);

Why should this rule be included in ESLint (instead of a plugin)?

I'm not sure, but it seems to me that this will reduce the number of incorrect, incomprehensible and lazy shutdowns of the linter

Are you willing to submit a pull request to implement this rule?

I doubt my competence, this rule does not look banal.

ota-meshi commented 4 years ago

Hi.

I think your proposed rule is already implemented in the master. #44 However, it has not been released yet.

dartess commented 4 years ago

Yes that's it. Thank! 🖤