New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Math.pow from no-restricted-properties
and use prefer-exponentiation-operator
instead.
#2421
Comments
That was added in eslint v6.7, and indeed, we will enable it when eslint 5 is dropped:
|
I'd like to help with this issue if it is still open for changes. |
This was done in f3d3a07 |
It looks like the README.md has not been updated yet to reflect that change (https://github.com/airbnb/javascript#es2016-properties--exponentiation-operator) |
@SpraxDev you're right; want to send a PR updating that? |
The change itself has already been made in f3d3a075cda2acc02011e71991c10bb5b4a15278 (tracked in/acording to airbnb/javascript#2421 (comment)). #2421 Remove Math.pow from `no-restricted-properties` and use `prefer-exponentiation-operator` instead.
The change itself has already been made in f3d3a075cda2acc02011e71991c10bb5b4a15278 (tracked in/acording to airbnb/javascript#2421 (comment)). #2421 Remove Math.pow from `no-restricted-properties` and use `prefer-exponentiation-operator` instead.
The change itself has already been made in f3d3a075cda2acc02011e71991c10bb5b4a15278 (tracked in/acording to airbnb/javascript#2421 (comment)). #2421 Remove Math.pow from `no-restricted-properties` and use `prefer-exponentiation-operator` instead.
Since ESlint has the helpful
prefer-exponentiation-operator
rule it would be nice ifMath.pow
was removed from theno-restricted-properties
definitions inrules/best-practices.js
in favor of theprefer-exponentiation-operator
rule.This has the benefit to us stubborn folks who want to use the
eslint-config-airbnb
oreslint-config-airbnb-base
packages but want to override the rule to allow the use ofMath.pow
. Theno-restricted-properties
ESlint rule can't be selectively modified, eslint/eslint#7957. It has to be completely duplicated and the desired change made in the duplicate. TheMath.pow
entry inno-restricted-properties
doesn't really fit in with the "intent" of the other entries in the no-restricted-propertiesobjects and since the
prefer-exponentiation-operator` rule exist it is a neat and tidy modification.Thank you,
aSqrd-eSqrd
The text was updated successfully, but these errors were encountered: