From d73f206a40cbfe3169cdc8eb520fc761f0e3180f Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Tue, 7 Jul 2026 00:36:21 -0500 Subject: [PATCH] style: wrap ternary conditions in parentheses in `stats/incr` examples Wrap the `isnan` ternary conditions in the nanmmin and nanmrss example files to satisfy the stdlib/ternary-condition-parentheses lint rule. Signed-off-by: Philipp Burckhardt --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js | 2 +- lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js index e40c3a8696c7..055b6adb14d4 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js @@ -35,5 +35,5 @@ console.log( '\nValue\tMin\n' ); for ( i = 0; i < 100; i++ ) { v = ( randu() < 0.1 ) ? NaN : randu() * 100.0; m = accumulator( v ); - console.log( '%s\t%s', isnan( v ) ? 'NaN' : v.toFixed( 4 ), ( m === null ) ? 'null' : m.toFixed( 4 ) ); + console.log( '%s\t%s', ( isnan( v ) ) ? 'NaN' : v.toFixed( 4 ), ( m === null ) ? 'null' : m.toFixed( 4 ) ); } diff --git a/lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js index 57d424fddece..ecc887c5730b 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js @@ -38,5 +38,5 @@ for ( i = 0; i < 100; i++ ) { v1 = ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 ); v2 = ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 ); rss = accumulator( v1, v2 ); - console.log( '%s\t%s\t%s', isnan( v1 ) ? 'NaN' : v1.toFixed( 3 ), isnan( v2 ) ? 'NaN' : v2.toFixed( 3 ), ( rss === null ) ? 'null' : rss.toFixed( 3 ) ); + console.log( '%s\t%s\t%s', ( isnan( v1 ) ) ? 'NaN' : v1.toFixed( 3 ), ( isnan( v2 ) ) ? 'NaN' : v2.toFixed( 3 ), ( rss === null ) ? 'null' : rss.toFixed( 3 ) ); }