-
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.
fix(core): consider config outside of current git repo
- Loading branch information
Showing
11 changed files
with
148 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
'type-enum': [2, 'always', ['outer']] | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
@commitlint/cli/fixtures/inner-scope/inner-scope/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,5 @@ | ||
module.exports = { | ||
rules: { | ||
'type-enum': [2, 'always', ['inner']] | ||
} | ||
}; |
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: { | ||
'type-enum': [2, 'always', ['outer']] | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
rules: { | ||
outer: true, | ||
inner: false, | ||
child: false | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
@commitlint/core/fixtures/outer-scope/inner-scope/child-scope/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,7 @@ | ||
module.exports = { | ||
rules: { | ||
outer: false, | ||
inner: false, | ||
child: true | ||
} | ||
}; |
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
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,25 @@ | ||
import crypto from 'crypto'; | ||
import os from 'os'; | ||
import path from 'path'; | ||
|
||
import * as sander from '@marionebl/sander'; | ||
import pkgDir from 'pkg-dir'; | ||
|
||
export {bootstrap}; | ||
|
||
async function bootstrap(fixture) { | ||
const cwd = path.join(os.tmpdir(), rand()); | ||
|
||
if (typeof fixture !== 'undefined') { | ||
await sander.copydir(await pkgDir(), fixture).to(cwd); | ||
} | ||
|
||
return cwd; | ||
} | ||
|
||
function rand() { | ||
return crypto | ||
.randomBytes(Math.ceil(6)) | ||
.toString('hex') | ||
.slice(0, 12); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import * as fix from './fix'; | ||
import * as git from './git'; | ||
import * as npm from './npm'; | ||
|
||
export {git, npm}; | ||
export {fix, git, npm}; |