We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to know if the following can be accomplished with the typescript-formatter options that are currently available.
Take this control block here:
if (true) { // do something } else { // do something else }
Using my settings (see below) the formatter converts it to
Is there a way to format it so that the "else" is in a new line? It should look like this:
What would be the best way to define such a rule? Insert a newline after the closing brace, or insert a newline before the "else"?
Here are my options for typescript-formatter
{ "insertSpaceAfterCommaDelimiter": true, "insertSpaceAfterSemicolonInForStatements": true, "insertSpaceBeforeAndAfterBinaryOperators": true, "insertSpaceAfterConstructor": false, "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, // () "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, // [] "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, // {} // "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, // "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, // "insertSpaceAfterTypeAssertion": false, // "insertSpaceBeforeFunctionParenthesis": false, "placeOpenBraceOnNewLineForFunctions": true, "placeOpenBraceOnNewLineForControlBlocks": true }
The text was updated successfully, but these errors were encountered:
sorry, I have no idea. Is it can on VSCode or any other editor that uses TypeScript LanguageService?
Sorry, something went wrong.
No branches or pull requests
I would like to know if the following can be accomplished with the typescript-formatter options that are currently available.
Take this control block here:
Using my settings (see below) the formatter converts it to
Is there a way to format it so that the "else" is in a new line? It should look like this:
What would be the best way to define such a rule? Insert a newline after the closing brace, or insert a newline before the "else"?
Here are my options for typescript-formatter
The text was updated successfully, but these errors were encountered: