Skip to content

Commit e5b718f

Browse files
committed
refactor(core): read config from commitlint.config.js
1 parent 9e25cc6 commit e5b718f

39 files changed

+96
-88
lines changed

.commitlintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

@commitlint/cli/cli.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test('should fail for input from stdin with rule from rc', async t => {
5151
});
5252

5353
test('should fail for input from stdin with rule from js', async t => {
54-
const actual = await t.throws(cli('foo: bar', ['--extends', './commitlint'], {cwd: EXTENDS_ROOT}));
54+
const actual = await t.throws(cli('foo: bar', ['--extends', './extended'], {cwd: EXTENDS_ROOT}));
5555
t.true(actual.stdout.includes('scope must not be one of [foo]'));
5656
t.is(actual.code, 1);
5757
});

@commitlint/cli/fixtures/empty/.commitlintrc

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

@commitlint/cli/fixtures/extends-root/.commitlintrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

@commitlint/cli/fixtures/simple/.commitlintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
rules: {
3+
'type-enum': [2, 'never', ['foo']]
4+
}
5+
};

@commitlint/cli/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
```shell
88
npm install --save-dev @commitlint/cli @commitlint/config-angular
9-
echo '{"extends": ["@commitlint/config-angular"]}' > .commitlintrc
9+
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
1010
```
1111

1212
Consult [docs/cli](../../docs/cli) for comprehensive documentation.

@commitlint/config-angular/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Shareable `commitlint` config enforcing the angular commit convention.
77

88
```sh
99
npm install --save-dev @commitlint/config-angular @commitlint/cli
10-
echo '{"extends": ["@commitlint/config-angular"]}' > .commitlintrc
10+
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
1111
```
1212

1313
## Rules

0 commit comments

Comments
 (0)