Skip to content

Commit

Permalink
refactor: config option parent -> parents (#26609)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
3 people committed Jan 22, 2024
1 parent 979358c commit d908ca3
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 97 deletions.
2 changes: 1 addition & 1 deletion lib/config/__snapshots__/validation.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ exports[`config/validation validateConfig(config) validates regEx for each fileM
exports[`config/validation validateConfig(config) warns if hostType has the wrong parent 1`] = `
[
{
"message": "hostType should only be configured within a "hostRules" object. Was found in .",
"message": "hostType should only be configured within one of "hostRules" objects. Was found in .",
"topic": "hostType",
},
]
Expand Down
2 changes: 1 addition & 1 deletion lib/config/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function getConfig(): AllConfig {
const options = getOptions();
const config: AllConfig = {};
options.forEach((option) => {
if (!option.parent) {
if (!option.parents) {
config[option.name] = getDefault(option);
}
});
Expand Down

0 comments on commit d908ca3

Please sign in to comment.