From 5e7503dadd495c67c12d36f572997ad5f9a9ea91 Mon Sep 17 00:00:00 2001 From: Pi Lanningham Date: Tue, 18 Apr 2017 12:42:03 -0400 Subject: [PATCH] Add typescript as a valid parser value (#1318) * Add typescript as a valid parser value Now that typescript development has started, each contributor has been adding this as a supported flag themselves. This just adds it as an allowed option, with a warning that support for this parser is experimental. I also tried to structure this a bit future proof, in case other experimental parsers come along. * Simplifies the code at vjeux's request Rather than a notion of "experimental" parsers, we'll just leave typescript out of the documentation until it's supported. --- bin/prettier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/prettier.js b/bin/prettier.js index 69f1ff5c3..41aa0c96e 100755 --- a/bin/prettier.js +++ b/bin/prettier.js @@ -66,7 +66,7 @@ function getParserOption() { return "flow"; } - if (value === "flow" || value === "babylon") { + if (value === "flow" || value === "babylon" || value === "typescript") { return value; }