From 444c3059f6787915846b6db558a6df0bdfb50a72 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Tue, 25 Jun 2019 09:41:26 -0700 Subject: [PATCH] Handle feeedback --- src/services/formatting/README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/services/formatting/README.md b/src/services/formatting/README.md index bd1e451aaeb..33515db34b4 100644 --- a/src/services/formatting/README.md +++ b/src/services/formatting/README.md @@ -30,14 +30,4 @@ There are a lot of rules, which you can find in [rules.ts](./rules.ts) each one ### Where is this used? -The formatter is used mainly from the language service for formatting with an editor, but [services/textChanges.ts](/src/services/textChanges.ts) also uses this formatter when emitting code for quick fixes. - -The formatter is not exported publicly, and so all usage comes through the language server. - -### Sample code - -```ts -const nonFormattedText = `[js source code]`; -const sourceFile = createSourceFile("any file name", nonFormattedText, ScriptTarget.ESNext, /*setParentNodes*/ true, ScriptKind.JS); -const changes = formatting.formatDocument(sourceFile, formatContext); -``` +The formatter is used mainly from any language service operation that inserts or modifies code. The formatter is not exported publicly, and so all usage can only come through the language server.