mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
fix: set commitConvention
default same as app
(#318)
This commit is contained in:
parent
382f44cca3
commit
94b555e274
2 changed files with 7 additions and 12 deletions
|
@ -84,14 +84,11 @@ const questions = [
|
|||
name: 'commitConvention',
|
||||
message: 'What commit convention would you want it to use?',
|
||||
choices: Object.values(conventions),
|
||||
default: 'none',
|
||||
default: 'angular',
|
||||
},
|
||||
]
|
||||
|
||||
const uniqueFiles = _.flow(
|
||||
_.compact,
|
||||
_.uniq,
|
||||
)
|
||||
const uniqueFiles = _.flow(_.compact, _.uniq)
|
||||
|
||||
module.exports = function prompt() {
|
||||
return git
|
||||
|
|
|
@ -10,7 +10,7 @@ function readConfig(configPath) {
|
|||
config.repoType = 'github'
|
||||
}
|
||||
if (!('commitConvention' in config)) {
|
||||
config.commitConvention = 'none'
|
||||
config.commitConvention = 'angular'
|
||||
}
|
||||
if (changed) {
|
||||
//Updates the file with fixes
|
||||
|
@ -20,9 +20,7 @@ function readConfig(configPath) {
|
|||
} catch (error) {
|
||||
if (error instanceof SyntaxError) {
|
||||
throw new SyntaxError(
|
||||
`Configuration file has malformed JSON: ${configPath}. Error:: ${
|
||||
error.message
|
||||
}`,
|
||||
`Configuration file has malformed JSON: ${configPath}. Error:: ${error.message}`,
|
||||
)
|
||||
}
|
||||
if (error.code === 'ENOENT') {
|
||||
|
|
Loading…
Reference in a new issue