Skip to content

Commit

Permalink
feat: add prompt for configuring commitlint with Husky
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulCatalinas committed Apr 30, 2024
1 parent ff176fe commit 4122a16
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/utils/add-commitlint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import inquirer from 'inquirer'

export async function addCommitlint(): Promise<boolean> {
try {
const { addCommitlint } = await inquirer.prompt({
type: 'confirm',
default: true,
name: 'addCommitlint',
message: 'Do you wanna add commitlint?:'
})

return addCommitlint
} catch (error) {
console.error(error)
throw new Error('Something went wrong, try again later.')
}
}

0 comments on commit 4122a16

Please sign in to comment.