Skip to content

Commit

Permalink
Added disable|no prefix to CLI exclusion args
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Mar 18, 2024
1 parent 478913a commit df5d044
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generate-pw/generate-pw.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ else { // run as CLI tool
includeNums: process.argv.some(arg => /^--?(?:n|(?:include-?)?num(?:ber)s?=?(?:true|1)?)$/.test(arg)),
includeSymbols: process.argv.some(arg => /^--?(?:s|(?:include-?)?symbols?=?(?:true|1)?)$/.test(arg)),
excludeLowerChars: process.argv.some(arg =>
/^--?(?:L|exclude-?lower-?(?:case)?|lower-?(?:case)?=(?:false|0))$/.test(arg)),
/^--?(?:L|(?:exclude|disable|no)-?lower-?(?:case)?|lower-?(?:case)?=(?:false|0))$/.test(arg)),
excludeUpperChars: process.argv.some(arg =>
/^--?(?:U|exclude-?upper-?(?:case)?|upper-?(?:case)?=(?:false|0))$/.test(arg)),
/^--?(?:U|(?:exclude|disable|no)-?upper-?(?:case)?|upper-?(?:case)?=(?:false|0))$/.test(arg)),
strictMode: process.argv.some(arg => /^--?s(?:trict)?/.test(arg))
};

console.log(config.excludeChars) ; return

Check failure on line 127 in generate-pw/generate-pw.js

View workflow job for this annotation

GitHub Actions / eslint

Missing semicolon

// Show VERSION number if -v or --version passed
if (process.argv.some(arg => /^--?ve?r?s?i?o?n?$/.test(arg))) {

Check failure on line 130 in generate-pw/generate-pw.js

View workflow job for this annotation

GitHub Actions / eslint

Unreachable code
console.info('v' + require('./package.json').version);
Expand Down

0 comments on commit df5d044

Please sign in to comment.