Ale: Ale-fixers for Prettier-eslint

Created on 10 Jun 2017  路  2Comments  路  Source: dense-analysis/ale

Hello,

I am trying to fix on errors while saving the file with "prettier-eslint". eslint_d works great, finds the errors instantly. But I can't run the "prettier-eslint". (Interestingly, prettier and eslint_d --fix works properly)

I tried different things like local and global ones. But I got errors whatever I did.

PATH includes prettier-eslint(v4.0.4), prettier(v1.4.4), eslint(v3.19.0) and eslint_d(v4.2.5) commands.

How can I debug the error message?

PS: I've been using the prettier-eslint command for a long time with a problem in VIM with:

autocmd FileType javascript.jsx,javascript setlocal formatprg=prettier-eslint\ --stdin

Error:

Error detected while processing function ale#fix#Fix[11]..<SNR>140_GetCallbacks[31]..ale#util#GetFunction:
line    2:
E475: Invalid argument: prettier-eslint 

My configuration:

let g:ale_linters = {
\   'javascript': ['eslint'],
\ }
let g:ale_fixers = {
\   'javascript': ['prettier-eslint'],
\ }
let g:ale_javascript_eslint_executable = 'eslint_d'
let g:ale_javascript_eslint_use_global = 1
let g:ale_javascript_prettier_eslint_executable = 'prettier-eslint'
let g:ale_javascript_prettier_eslint_use_global = 1
let g:ale_fix_on_save = 1
 Current Filetype: javascript.jsx
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
  Enabled Linters: ['eslint']
 Linter Variables:

let g:ale_javascript_eslint_executable = 'eslint_d'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 1
 Global Variables:

let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 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_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {'javascript': ['eslint']}
let g:ale_open_list = 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_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(finished - exit code 1) ['/bin/zsh', '-c', '''eslint_d'' -f unix --stdin --stdin-filename ''/Users/xyz/asd/abc/src/components/Pages/Register.jsx'' < ''/var/folders/cj/1pkmv9j123j8rkj60sk0y5xr0000gn/T/vbUGuLO/5/Register.jsx''']

Most helpful comment

Thanks @w0rp, I missed that.. Thanks for this great plugin.

All 2 comments

Have a look at :ALEFixSuggest. The name of the linter in the register is prettier_eslint.

Thanks @w0rp, I missed that.. Thanks for this great plugin.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arthuryangcs picture arthuryangcs  路  4Comments

alexlafroscia picture alexlafroscia  路  4Comments

garand picture garand  路  4Comments

kronos29296 picture kronos29296  路  4Comments

ilyakopy picture ilyakopy  路  4Comments