File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const report = lint(
77
77
78
78
# ## Recipes
79
79
80
- * As a git ` commitmsg` hook with husky
80
+ * As a ` commitmsg` git- hook with [ " husky" ](https://git.io/JDwyQg)
81
81
82
82
` ` ` json
83
83
{
@@ -99,13 +99,17 @@ const report = lint(
99
99
100
100
# # Configuration
101
101
102
- ` conventional-changelog-lint` allows detailed configuration via
102
+ ` conventional-changelog-lint` is configured via
103
103
` .conventional-changelog-lintrc` and shareable configuration.
104
- By default it will use the
104
+
105
+ When no ` .conventional-changelog-lintrc` is found it will use the
105
106
[angular](https://github.com/marionebl/conventional-changelog-lint-config-angular#rules)
106
107
shareable config.
107
108
See the documentation there for default rules.
108
109
110
+ When a ` .conventional-changelog-lintrc` is found it will ** not** load any preset
111
+ unless specified via [extends](# extends) configuration.
112
+
109
113
# ## extends
110
114
111
115
` ` ` js
@@ -150,8 +154,9 @@ for details
150
154
}
151
155
}
152
156
` ` `
157
+
153
158
Rules applicable to the linted commit messages.
154
- By default all rules are disabled via a level of 0.
159
+ By default all rules are turned off via a level of 0.
155
160
They can be enabled by shareable configuration,
156
161
such as the
157
162
[angular config](https://github.com/marionebl/conventional-changelog-lint-config-angular),
Original file line number Diff line number Diff line change @@ -15,9 +15,18 @@ const defaultSettings = {
15
15
} ;
16
16
17
17
export default async ( name = defaultName , settings = defaultSettings , seed = { } ) => {
18
+ // Obtain config from .rc files
19
+ const userConfig = rc ( name , settings . defaults ) ;
20
+
21
+ // Use the default extends config if there is no userConfig
22
+ // See https://git.io/vwT1C for reference
23
+ const applicableDefaults = userConfig ?
24
+ { } :
25
+ defaults ;
26
+
18
27
// Merge passed config with file based options
19
- const config = merge ( rc ( name , settings . defaults ) , seed ) ;
20
- const opts = merge ( { } , defaults , pick ( config , 'extends' ) ) ;
28
+ const config = merge ( userConfig , seed ) ;
29
+ const opts = merge ( { } , applicableDefaults , pick ( config , 'extends' ) ) ;
21
30
22
31
// Resolve extends key
23
32
const extended = resolveExtends ( opts , settings . prefix ) ;
You can’t perform that action at this time.
0 commit comments