-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathutils.ts
33 lines (28 loc) · 1.03 KB
/
utils.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"use strict";
import ts = require("typescript");
import lib = require("./index");
export function createDefaultFormatCodeOptions(): ts.FormatCodeOptions {
"use strict";
return {
IndentSize: 4,
TabSize: 4,
NewLineCharacter: '\r\n',
ConvertTabsToSpaces: true,
InsertSpaceAfterCommaDelimiter: true,
InsertSpaceAfterSemicolonInForStatements: true,
InsertSpaceBeforeAndAfterBinaryOperators: true,
InsertSpaceAfterKeywordsInControlFlowStatements: true,
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
PlaceOpenBraceOnNewLineForFunctions: false,
PlaceOpenBraceOnNewLineForControlBlocks: false
};
}
export function createDefaultAdditionalFormatCodeOptions(): lib.AdditionalFormatOptions {
"use strict";
return {
noConsecutiveBlankLines: false,
noTrailingWhitespace: false
};
}