Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0a7b1c6

Browse files
author
Ben Quarmby
committedJul 31, 2024·
feat: support CLI options from JSON file or Common.js module
1 parent ed321d4 commit 0a7b1c6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎@commitlint/cli/src/cli.ts

+5
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ const cli = yargs(process.argv.slice(2))
143143
.alias('v', 'version')
144144
.help('help')
145145
.alias('h', 'help')
146+
.config(
147+
'options',
148+
'path to a JSON file or Common.js module containing CLI options',
149+
require
150+
)
146151
.usage(`${pkg.name}@${pkg.version} - ${pkg.description}\n`)
147152
.usage(
148153
`[input] reads from stdin if --edit, --env, --from and --to are omitted`

‎docs/reference/cli.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Options:
3636
[boolean]
3737
-s, --strict enable strict mode; result code 2 for warnings, 3 for
3838
errors [boolean]
39+
--options path to a JSON file or Common.js module containing CLI
40+
options
3941
-v, --version display version information [boolean]
4042
-h, --help Show help [boolean]
4143
```

0 commit comments

Comments
 (0)
Please sign in to comment.