--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidFunction.js --- # Input ```jsx function test() { "use strict"; "use strict"; } ``` # Diagnostics ``` invalidFunction.js:2:2 lint/suspicious/noRedundantUseStrict FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Redundant use strict directive. 1 │ function test() { > 2 │ "use strict"; │ ^^^^^^^^^^^^^ 3 │ "use strict"; 4 │ } i The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it. i Safe fix: Remove the redundant use strict directive. 1 1 │ function test() { 2 │ - → "use·strict"; 3 │ - → "use·strict"; 2 │ + → → "use·strict"; 4 3 │ } 5 4 │ ``` ``` invalidFunction.js:3:2 lint/suspicious/noRedundantUseStrict FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Redundant use strict directive. 1 │ function test() { 2 │ "use strict"; > 3 │ "use strict"; │ ^^^^^^^^^^^^^ 4 │ } 5 │ i The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it. i Safe fix: Remove the redundant use strict directive. 1 1 │ function test() { 2 2 │ "use strict"; 3 │ - → "use·strict"; 4 │ - } 3 │ + → } 5 4 │ ```