Configuration
Commitlint can be configured in many ways. You can use the default configuration or you can specify your own configuration file.
Default configuration
If you donβt specify any configuration file and you donβt have any commitlint configuration files in your environment, the CLI will use the default configurations of each rules.
See the default rules page for details.
Location
Commitlint will look for configuration in the following places.
Default
If no flag (see next section) is specified, the Commitlint will look for configuration in the following places in the current working directory:
.commitlintrc
(JSON or YAML file).commitlintrc.json
(JSON file).commitlintrc.yml
(YAML file).commitlintrc.yaml
(YAML file)
Using the flag
Configuration file can be specified by using the --config
flag or the short -g
flag.
If you specify a file and the file is not found, Commitlint will throw an error.
Debug configuration
You can use the --print-config
flag to print the configuration that will be used by Commitlint.