Skip to content

Commit

Permalink
Fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 29, 2023
1 parent 0cacfbd commit be70daa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
8 changes: 6 additions & 2 deletions src/cli/cli-options.evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,13 @@ const options = {
type: "flag",
},
ignorePath: {
array: true,
category: optionCategories.CATEGORY_CONFIG,
default: ".prettierignore",
description: "Path to a file with patterns describing files to ignore.",
default: [{ value: [".prettierignore"] }],
description: outdent`
Path to a file with patterns describing files to ignore.
Multiple values are accepted.
`,
type: "path",
},
ignoreUnknown: {
Expand Down
16 changes: 1 addition & 15 deletions src/cli/options/create-minimist-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,7 @@ export default function createMinimistOptions(detailedOptions) {
name === "plugin-search-dir") &&
option.default !== undefined
) {
let defaultValue = option.default;
/*
FIXME:
This part is not right for "plugin-search-dir" we got `[]`,
but for "ignore-path" we got `[{value: []}]`.
Probably because "plugin-search-dir" is an api option
*/
if (
Array.isArray(defaultValue) &&
defaultValue.length === 1 &&
defaultValue[0].value
) {
defaultValue = defaultValue[0].value;
}
defaultValues[option.name] = defaultValue;
defaultValues[option.name] = option.default;
}
}

Expand Down

0 comments on commit be70daa

Please sign in to comment.