Closed aSqrd-eSqrd closed 1 year ago
That was added in eslint v6.7, and indeed, we will enable it when eslint 5 is dropped: https://github.com/airbnb/javascript/blob/1eadb93e377da1e56c3f91f26610e5d0a00738a9/packages/eslint-config-airbnb-base/rules/style.js#L444
I'd like to help with this issue if it is still open for changes.
This was done in f3d3a075c
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?
I've created #2768 @ljharb ^^
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