-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable alternative config formats (#83)
* feat(core): Allow to configure with json, yaml and package.json Fix #73 * chore: consolidate dev dependencies * chore: introduce cwd awareness * allow forced cwds * remove flaky tests BREAKING CHANGE: discontinue support of conventional-changelog-lintrc * test: make git setup reliable
- Loading branch information
Showing
33 changed files
with
364 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
@commitlint/core/fixtures/legacy/.conventional-changelog-lintrc
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
@commitlint/core/fixtures/overriden-legacy/.conventional-changelog-lintrc
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-js/.commitlintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./first-extended'], | ||
rules: { | ||
zero: 0 | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-js/first-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; |
2 changes: 1 addition & 1 deletion
2
...res/overriden-legacy/commitlint.config.js → ...s/first-extended/second-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
legacy: false | ||
two: 2 | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-json/.commitlintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": ["./first-extended"], | ||
"rules": { | ||
"zero": 0 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-json/first-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
@commitlint/core/fixtures/recursive-extends-json/first-extended/second-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
two: 2 | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-package/first-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
@commitlint/core/fixtures/recursive-extends-package/first-extended/second-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
two: 2 | ||
} | ||
}; |
8 changes: 8 additions & 0 deletions
8
@commitlint/core/fixtures/recursive-extends-package/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"commitlint": { | ||
"extends": ["./first-extended"], | ||
"rules": { | ||
"zero": 0 | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
@commitlint/core/fixtures/recursive-extends-yaml/.commitlintrc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extends: | ||
- "./first-extended" | ||
rules: | ||
zero: 0 |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends-yaml/first-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
@commitlint/core/fixtures/recursive-extends-yaml/first-extended/second-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
two: 2 | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
@commitlint/core/fixtures/recursive-extends/first-extended/commitlint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; |
7 changes: 1 addition & 6 deletions
7
@commitlint/core/fixtures/recursive-extends/first-extended/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
module.exports = { | ||
extends: ['./second-extended'], | ||
rules: { | ||
one: 1 | ||
} | ||
}; | ||
module.exports = require('./commitlint.config.js'); |
13 changes: 6 additions & 7 deletions
13
...s/recursive-parser-preset/first-extended/second-extended/conventional-changelog-custom.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
const defaultOpts = require('conventional-changelog-angular'); | ||
const _ = require('lodash'); | ||
|
||
module.exports = defaultOpts.then(data => { | ||
const extented = _.cloneDeep(data); | ||
extented.parserOpts.headerPattern = /^(\w*)(?:\((.*)\))?-(.*)$/; | ||
return extented; | ||
module.exports = Promise.resolve().then(() => { | ||
return { | ||
parserOpts: { | ||
headerPattern: /^(\w*)(?:\((.*)\))?-(.*)$/ | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.