math/prefer-exponentiation-operator
enforce the use of exponentiation (
**
) operator instead of other calculations
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule. - 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
This rule aims to enforce the use of exponentiation (**
) operator instead of other calculations.
This rule was inspired by ESLint Core's prefer-exponentiation-operator, but additionally detects multiplication with the same operands.
🔧 Options
Nothing.
📚 Further reading
👫 Related rules
🚀 Version
This rule was introduced in eslint-plugin-math v0.6.0