diff --git a/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/lib/main.js b/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/lib/main.js index 40af05a05095..2631ddc0cd76 100644 --- a/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/lib/main.js @@ -26,14 +26,14 @@ var endsWith = require( '@stdlib/string/ends-with' ); // MAIN // /** -* Rule for enforcing that semicolons are omitted if output is not suppressed. +* Rule for enforcing that semicolons are omitted only if output is not suppressed. * * @param {Context} context - lint context * @returns {Object} validators */ function main( context ) { /** - * Checks examples section for whether semicolons are always omitted if output is not suppressed. + * Checks examples section for whether semicolons are omitted only if output is not suppressed. * * @private * @param {Object} section - examples section @@ -49,6 +49,9 @@ function main( context ) { if ( endsWith( current.code, ';' ) && current.output ) { context.report( 'Omit semicolons if output shall not be suppressed', section ); } + if ( !endsWith( current.code, ';' ) && !current.output ) { + context.report( 'Semicolons must not be omitted if output is suppressed', section ); + } } } diff --git a/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/package.json b/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/package.json index b2dabaeb3150..bdff76f62905 100644 --- a/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/package.json +++ b/lib/node_modules/@stdlib/_tools/repl-txt/rules/code-semicolons/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/_tools/repl-txt/rules/code-semicolons", "version": "0.0.0", - "description": "Lint rule to enforce that semicolons are omitted if output is not suppressed.", + "description": "Lint rule to enforce that semicolons are omitted only if output is not suppressed.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors",