Since ESlint has the helpful prefer-exponentiation-operator rule it would be nice if Math.pow was removed from the no-restricted-properties definitions in rules/best-practices.js in favor of the prefer-exponentiation-operator rule.
This has the benefit to us stubborn folks who want to use the eslint-config-airbnb or eslint-config-airbnb-base packages but want to override the rule to allow the use of Math.pow. The no-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. The Math.pow entry in no-restricted-properties doesn't really fit in with the "intent" of the other entries in the no-restricted-propertiesobjects and since theprefer-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:
aSqrd-eSqrd commentedMay 4, 2021
Since ESlint has the helpful
prefer-exponentiation-operatorrule it would be nice ifMath.powwas removed from theno-restricted-propertiesdefinitions inrules/best-practices.jsin favor of theprefer-exponentiation-operatorrule.This has the benefit to us stubborn folks who want to use the
eslint-config-airbnboreslint-config-airbnb-basepackages but want to override the rule to allow the use ofMath.pow. Theno-restricted-propertiesESlint rule can't be selectively modified, eslint/eslint#7957. It has to be completely duplicated and the desired change made in the duplicate. TheMath.powentry inno-restricted-propertiesdoesn't really fit in with the "intent" of the other entries in the no-restricted-propertiesobjects and since theprefer-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: