Remove deprecated options (#7536)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-02-24 18:58:32 +02:00
1 parent fc8218b5a6
commit 6515a7ebe9
5 files changed
+6 -29

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
#### Remove deprecated options ([#7536](https://github.com/prettier/prettier/pull/7536) by [@fisker](https://github.com/fisker))
`trailingComma` choices `true`(rename to `always` since _v1.9.0_) / `false`(rename to `never` since _v1.9.0_) is removed.\
`proseWrap` choices `true`(rename to `es5` since _v0.19.0_) / `false`(rename to `none` since _0.19.0_) is removed.
+1 -3
View File
@@ -43,9 +43,7 @@ module.exports = {
since: "1.9.0",
value: "preserve",
description: "Wrap prose as-is."
},
{ value: false, deprecated: "1.9.0", redirect: "never" },
{ value: true, deprecated: "1.9.0", redirect: "always" }
}
]
}
};
+1 -3
View File
@@ -94,9 +94,7 @@ module.exports = {
value: "all",
description:
"Trailing commas wherever possible (including function arguments)."
},
{ value: true, deprecated: "0.19.0", redirect: "es5" },
{ value: false, deprecated: "0.19.0", redirect: "none" }
}
]
}
};
@@ -13,18 +13,6 @@ exports[`boolean flags do not swallow the next argument (stdout) 1`] = `
exports[`boolean flags do not swallow the next argument (write) 1`] = `Array []`;
exports[`deprecated option values are warned (stderr) 1`] = `
"[warn] --trailing-comma without an argument is deprecated; we now treat it as --trailing-comma=es5.
"
`;
exports[`deprecated option values are warned (stdout) 1`] = `
"console.log(\\"could be single quote and without semi\\");
"
`;
exports[`deprecated option values are warned (write) 1`] = `Array []`;
exports[`deprecated options are warned (stderr) 1`] = `
"[warn] --flow-parser is deprecated; we now treat it as --parser=flow.
"
@@ -57,17 +57,6 @@ describe("deprecated options are warned", () => {
});
});
describe("deprecated option values are warned", () => {
runPrettier("cli/arg-parsing", [
"--end-of-line",
"lf",
"file.js",
"--trailing-comma"
]).test({
status: 0
});
});
describe("allow overriding flags", () => {
runPrettier(
"cli/arg-parsing",