Skip to content

Commit

Permalink
refactor: typo quit -> quiet (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill authored Jan 30, 2023
1 parent 1488785 commit 7be9d3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ If file/glob is omitted, './package.json' file will be processed.
)
}

function sortPackageJsonFiles(patterns, { isCheck, shouldBeQuit }) {
function sortPackageJsonFiles(patterns, { isCheck, shouldBeQuiet }) {
const files = globbySync(patterns)
const printToStdout = shouldBeQuit ? () => {} : console.log
const printToStdout = shouldBeQuiet ? () => {} : console.log

if (files.length === 0) {
console.error('No matching files.')
Expand Down Expand Up @@ -93,13 +93,13 @@ function run() {

const patterns = []
let isCheck = false
let shouldBeQuit = false
let shouldBeQuiet = false

for (const argument of cliArguments) {
if (argument === '--check' || argument === '-c') {
isCheck = true
} else if (argument === '--quiet' || argument === '-q') {
shouldBeQuit = true
shouldBeQuiet = true
} else {
patterns.push(argument)
}
Expand All @@ -109,7 +109,7 @@ function run() {
patterns[0] = 'package.json'
}

sortPackageJsonFiles(patterns, { isCheck, shouldBeQuit })
sortPackageJsonFiles(patterns, { isCheck, shouldBeQuiet })
}

run()

0 comments on commit 7be9d3a

Please sign in to comment.