Skip to content

Commit 0ed3fbc

Browse files
committed
Fix #2263 - detailed Flow errors should show the original message
1 parent b315667 commit 0ed3fbc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ale_linters/javascript/flow.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
155155
\}
156156

157157
if has_key(l:error, 'extra')
158-
let l:errorToAdd.detail = s:GetDetails(l:error)
158+
let l:errorToAdd.detail = l:errorToAdd.text
159+
\ . "\n" . s:GetDetails(l:error)
159160
endif
160161

161162
call add(l:output, l:errorToAdd)

test/handler/test_flow_handler.vader

+2-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ Execute(The flow handler should handle extra errors):
499499
\ 'col': 35,
500500
\ 'type': 'E',
501501
\ 'text': 'props of React element `New`: This type is incompatible with object type',
502-
\ 'detail': 'Property `setVector` is incompatible: number This type is incompatible with function type ',
502+
\ 'detail': 'props of React element `New`: This type is incompatible with object type'
503+
\ . "\nProperty `setVector` is incompatible: number This type is incompatible with function type ",
503504
\ }
504505
\]
505506

0 commit comments

Comments
 (0)