dense-analysis / dense-analysis/ale

When a typescript file fixes using prettier_eslint, it writes debug info to current buffer

Open
#1,474 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

NVIM v0.2.2
Build type: Release

Operating System: macOS 10.13.3

### :ALEInfo

```
Current Filetype: typescript
Available Linters: ['eslint', 'tslint', 'tsserver', 'typecheck']
Enabled Linters: ['eslint']
Linter Variables:
Global Variables:
let g:ale_cache_executable_check_failures = 0
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'typescript': ['prettier', 'eslint', 'prettier_eslint'], 'javascript': ['prettier', 'eslint', 'prettier_eslint']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'typescript': ['prettier', 'eslint'], 'javascript': ['prettier', 'eslint']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '✖'
let g:ale_sign_info = '⚠'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '✖'
let g:ale_sign_style_warning = '⚠'
let g:ale_sign_warning = '⚠'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) /Users/me/code/myapp/node_modules/eslint/bin/eslint.js
(started) ['/usr/local/bin/zsh', '-c', '''/Users/me/code/myapp/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/me/code/myapp/app/javascript/index.tsx'' < ''/var/folders/h8/5640k_095771kqqc4k9cpp0h0000gn/T/
nvimkp7ZGq/4/index.tsx''']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''/Users/me/code/myapp/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/me/code/myapp/index.tsx'' < ''/var/folders/h8/5640k_095771kqqc4k
9cpp0h0000gn/T/nvimkp7ZGq/5/index.tsx''']
<<>>
=============
WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-eslint-parser.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: ~2.7.1
YOUR TYPESCRIPT VERSION: 2.8.0-rc
Please only submit bug reports when using the officially supported version.
=============
/Users/me/code/myapp/index.tsx:1:0: Parsing error: Merge conflict marker encountered. [Error]
1 problem
<<>>
```

## What went wrong

Upon writing to the buffer, the fixer for `typescript` runs, which for me is `['prettier', 'eslint', 'prettier_eslint']`, and the following is written to the top of the buffer that was written to:

```
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-eslint-parser.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~2.7.1

YOUR TYPESCRIPT VERSION: 2.8.0-rc

Please only submit bug reports when using the officially supported version.

=============
```

So, as you can see it literally wrote the contents of `OUTPUT STARTS` and `OUTPUT ENDS` to the buffer.

The fixer behavior, other than that, is exactly as expected. It is respecting my local `.eslintrc`, for `prettier` + `eslint`, aka `prettier-eslint`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.