--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidParentsWithLowerPrecedence.js --- # Input ```jsx // parents with a lower precedence a * Math.pow(b, c); Math.pow(a, b) * c; a + Math.pow(b, c); Math.pow(a, b)/c; a < Math.pow(b, c); Math.pow(a, b) > c; a === Math.pow(b, c); a ? Math.pow(b, c) : d; a = Math.pow(b, c); a += Math.pow(b, c); function *f() { yield Math.pow(a, b) } a, Math.pow(b, c), d ``` # Diagnostics ``` invalidParentsWithLowerPrecedence.js:2:5 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 1 │ // parents with a lower precedence > 2 │ a * Math.pow(b, c); │ ^^^^^^^^^^^^^^ 3 │ Math.pow(a, b) * c; 4 │ a + Math.pow(b, c); i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 1 1 │ // parents with a lower precedence 2 │ - a·*·Math.pow(b,·c); 2 │ + a·*·b·**·c; 3 3 │ Math.pow(a, b) * c; 4 4 │ a + Math.pow(b, c); ``` ``` invalidParentsWithLowerPrecedence.js:3:1 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 1 │ // parents with a lower precedence 2 │ a * Math.pow(b, c); > 3 │ Math.pow(a, b) * c; │ ^^^^^^^^^^^^^^ 4 │ a + Math.pow(b, c); 5 │ Math.pow(a, b)/c; i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 1 1 │ // parents with a lower precedence 2 2 │ a * Math.pow(b, c); 3 │ - Math.pow(a,·b)·*·c; 3 │ + a·**·b·*·c; 4 4 │ a + Math.pow(b, c); 5 5 │ Math.pow(a, b)/c; ``` ``` invalidParentsWithLowerPrecedence.js:4:5 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 2 │ a * Math.pow(b, c); 3 │ Math.pow(a, b) * c; > 4 │ a + Math.pow(b, c); │ ^^^^^^^^^^^^^^ 5 │ Math.pow(a, b)/c; 6 │ a < Math.pow(b, c); i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 2 2 │ a * Math.pow(b, c); 3 3 │ Math.pow(a, b) * c; 4 │ - a·+·Math.pow(b,·c); 4 │ + a·+·b·**·c; 5 5 │ Math.pow(a, b)/c; 6 6 │ a < Math.pow(b, c); ``` ``` invalidParentsWithLowerPrecedence.js:5:1 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 3 │ Math.pow(a, b) * c; 4 │ a + Math.pow(b, c); > 5 │ Math.pow(a, b)/c; │ ^^^^^^^^^^^^^^ 6 │ a < Math.pow(b, c); 7 │ Math.pow(a, b) > c; i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 3 3 │ Math.pow(a, b) * c; 4 4 │ a + Math.pow(b, c); 5 │ - Math.pow(a,·b)/c; 5 │ + a·**·b/c; 6 6 │ a < Math.pow(b, c); 7 7 │ Math.pow(a, b) > c; ``` ``` invalidParentsWithLowerPrecedence.js:6:5 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 4 │ a + Math.pow(b, c); 5 │ Math.pow(a, b)/c; > 6 │ a < Math.pow(b, c); │ ^^^^^^^^^^^^^^ 7 │ Math.pow(a, b) > c; 8 │ a === Math.pow(b, c); i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 4 4 │ a + Math.pow(b, c); 5 5 │ Math.pow(a, b)/c; 6 │ - a·<·Math.pow(b,·c); 6 │ + a·<·b·**·c; 7 7 │ Math.pow(a, b) > c; 8 8 │ a === Math.pow(b, c); ``` ``` invalidParentsWithLowerPrecedence.js:7:1 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 5 │ Math.pow(a, b)/c; 6 │ a < Math.pow(b, c); > 7 │ Math.pow(a, b) > c; │ ^^^^^^^^^^^^^^ 8 │ a === Math.pow(b, c); 9 │ a ? Math.pow(b, c) : d; i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 5 5 │ Math.pow(a, b)/c; 6 6 │ a < Math.pow(b, c); 7 │ - Math.pow(a,·b)·>·c; 7 │ + a·**·b·>·c; 8 8 │ a === Math.pow(b, c); 9 9 │ a ? Math.pow(b, c) : d; ``` ``` invalidParentsWithLowerPrecedence.js:8:7 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 6 │ a < Math.pow(b, c); 7 │ Math.pow(a, b) > c; > 8 │ a === Math.pow(b, c); │ ^^^^^^^^^^^^^^ 9 │ a ? Math.pow(b, c) : d; 10 │ a = Math.pow(b, c); i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 6 6 │ a < Math.pow(b, c); 7 7 │ Math.pow(a, b) > c; 8 │ - a·===·Math.pow(b,·c); 8 │ + a·===·b·**·c; 9 9 │ a ? Math.pow(b, c) : d; 10 10 │ a = Math.pow(b, c); ``` ``` invalidParentsWithLowerPrecedence.js:9:5 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 7 │ Math.pow(a, b) > c; 8 │ a === Math.pow(b, c); > 9 │ a ? Math.pow(b, c) : d; │ ^^^^^^^^^^^^^^ 10 │ a = Math.pow(b, c); 11 │ a += Math.pow(b, c); i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 7 7 │ Math.pow(a, b) > c; 8 8 │ a === Math.pow(b, c); 9 │ - a·?·Math.pow(b,·c)·:·d; 9 │ + a·?·b·**·c·:·d; 10 10 │ a = Math.pow(b, c); 11 11 │ a += Math.pow(b, c); ``` ``` invalidParentsWithLowerPrecedence.js:10:5 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 8 │ a === Math.pow(b, c); 9 │ a ? Math.pow(b, c) : d; > 10 │ a = Math.pow(b, c); │ ^^^^^^^^^^^^^^ 11 │ a += Math.pow(b, c); 12 │ function *f() { yield Math.pow(a, b) } i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 8 8 │ a === Math.pow(b, c); 9 9 │ a ? Math.pow(b, c) : d; 10 │ - a·=·Math.pow(b,·c); 10 │ + a·=·b·**·c; 11 11 │ a += Math.pow(b, c); 12 12 │ function *f() { yield Math.pow(a, b) } ``` ``` invalidParentsWithLowerPrecedence.js:11:6 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 9 │ a ? Math.pow(b, c) : d; 10 │ a = Math.pow(b, c); > 11 │ a += Math.pow(b, c); │ ^^^^^^^^^^^^^^ 12 │ function *f() { yield Math.pow(a, b) } 13 │ a, Math.pow(b, c), d i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 9 9 │ a ? Math.pow(b, c) : d; 10 10 │ a = Math.pow(b, c); 11 │ - a·+=·Math.pow(b,·c); 11 │ + a·+=·b·**·c; 12 12 │ function *f() { yield Math.pow(a, b) } 13 13 │ a, Math.pow(b, c), d ``` ``` invalidParentsWithLowerPrecedence.js:12:23 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 10 │ a = Math.pow(b, c); 11 │ a += Math.pow(b, c); > 12 │ function *f() { yield Math.pow(a, b) } │ ^^^^^^^^^^^^^^ 13 │ a, Math.pow(b, c), d 14 │ i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 10 10 │ a = Math.pow(b, c); 11 11 │ a += Math.pow(b, c); 12 │ - function·*f()·{·yield·Math.pow(a,·b)·} 12 │ + function·*f()·{·yield·a·**·b·} 13 13 │ a, Math.pow(b, c), d 14 14 │ ``` ``` invalidParentsWithLowerPrecedence.js:13:4 lint/style/useExponentiationOperator FIXABLE ━━━━━━━━━━━ ! Use the '**' operator instead of 'Math.pow'. 11 │ a += Math.pow(b, c); 12 │ function *f() { yield Math.pow(a, b) } > 13 │ a, Math.pow(b, c), d │ ^^^^^^^^^^^^^^ 14 │ i Unsafe fix: Use the '**' operator instead of 'Math.pow'. 11 11 │ a += Math.pow(b, c); 12 12 │ function *f() { yield Math.pow(a, b) } 13 │ - a,·Math.pow(b,·c),·d 13 │ + a,·b·**·c,·d 14 14 │ ```