1 parent
a44ef1fe8b
commit
7c9e589323
4 files changed
+87
-10
No files matched your search
+4
-10
@@ -49,7 +49,7 @@ const argv = minimist(args, {
|
||||
"debug-print-doc",
|
||||
"debug-check",
|
||||
"with-node-modules"
|
||||
],
|
||||
].concat(booleanOptionNames),
|
||||
string: [
|
||||
"cursor-offset",
|
||||
"range-start",
|
||||
@@ -58,7 +58,7 @@ const argv = minimist(args, {
|
||||
"config",
|
||||
"find-config-path",
|
||||
"ignore-path"
|
||||
],
|
||||
].concat(stringOptionNames),
|
||||
default: {
|
||||
color: true,
|
||||
"ignore-path": ".prettierignore"
|
||||
@@ -70,14 +70,8 @@ const argv = minimist(args, {
|
||||
},
|
||||
unknown: param => {
|
||||
if (param.startsWith("-")) {
|
||||
const paramName = param.replace(/--(no-)?/, "");
|
||||
if (
|
||||
booleanOptionNames.indexOf(paramName) === -1 &&
|
||||
stringOptionNames.indexOf(paramName) === -1
|
||||
) {
|
||||
console.warn("Ignored unknown option: " + param + "\n");
|
||||
return false;
|
||||
}
|
||||
console.warn("Ignored unknown option: " + param + "\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user