Fix incorrent enforcement of tabs to spaces conversion in typescript
This commit is contained in:
parent
c8a654a3ea
commit
d005a96ae2
|
@ -16,10 +16,14 @@ module.exports = class TypeScriptFormatter extends Beautifier
|
|||
# @verbose('format', format, formatterUtils)
|
||||
|
||||
opts = formatterUtils.createDefaultFormatCodeOptions()
|
||||
|
||||
if options.indent_with_tabs
|
||||
opts.ConvertTabsToSpaces = false
|
||||
else
|
||||
opts.TabSize = options.tab_width or options.indent_size
|
||||
opts.IndentSize = options.indent_size
|
||||
opts.IndentStyle = 'space'
|
||||
opts.convertTabsToSpaces = true
|
||||
|
||||
@verbose('typescript', text, opts)
|
||||
result = format('', text, opts)
|
||||
@verbose(result)
|
||||
|
|
Loading…
Reference in New Issue