Fix typescript-formatter issues for TSX
This commit is contained in:
parent
25a9ee8699
commit
6c38d3df3f
|
@ -26,8 +26,13 @@ module.exports = class TypeScriptFormatter extends Beautifier
|
||||||
opts.indentSize = options.indent_size
|
opts.indentSize = options.indent_size
|
||||||
opts.indentStyle = 'space'
|
opts.indentStyle = 'space'
|
||||||
|
|
||||||
|
if language is "TSX"
|
||||||
|
fileName = 'test.tsx'
|
||||||
|
else
|
||||||
|
fileName = ''
|
||||||
|
|
||||||
@verbose('typescript', text, opts)
|
@verbose('typescript', text, opts)
|
||||||
result = format('', text, opts)
|
result = format(fileName, text, opts)
|
||||||
@verbose(result)
|
@verbose(result)
|
||||||
resolve result
|
resolve result
|
||||||
catch e
|
catch e
|
||||||
|
|
Loading…
Reference in New Issue