eBay / eslint-config-ebay

MIT License
13 stars 11 forks source link

Proposal: Remove radix rule #3

Closed yomed closed 6 years ago

yomed commented 6 years ago

radix is currently enforced here: https://github.com/eBay/eslint-config-ebay/blob/b60daea8ce4c7dba25fae69bfc9af31ed84dda32/rules/bp.js#L119-L120

Pre-ES5, this can be useful for the edge case of octo literals, but no-octal is already enforced: https://github.com/eBay/eslint-config-ebay/blob/b60daea8ce4c7dba25fae69bfc9af31ed84dda32/rules/bp.js#L82-L83

On ES5+ there's questionable value in this rule to begin with, as mentioned here: https://eslint.org/docs/rules/radix

if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

So, I propose we remove this rule.

mikewoo200 commented 6 years ago

@yomed I agree with your reasoning. @senthilp What do you think?

senthilp commented 6 years ago

@yomed @mwoo It seems reasonable to remove. But what is developers are using this for legacy rules and targeting older browsers? I think even then all browsers now support ES5, so removing should be safe.

The original reason we added it was because MDN strongly recommends it. I am fine if everyone feels it is redundant now.

mikewoo200 commented 6 years ago

Since I haven't heard from anyone else, I removed the radix rule.

eslint-config-ebay@^0.1.7

https://github.com/eBay/eslint-config-ebay/tree/release-0.1.7