Ale: TSLint not available for ALE

Created on 25 May 2018  路  2Comments  路  Source: dense-analysis/ale

I'd like to use tslint, i have it installed (npm i -g tslint) and I have tslint.json with rules in my project root folder), but it's not amongst available linters. I am unable to find any advice on this topic. Could you tell me what I need to do?

Thanks

Information

VIM version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 18 2017 13:43:38)
Included patches: 1-1402

Operating System: WHAT OS WERE YOU USING?
Ubuntu 16.04 LTS

:ALEInfo

Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Linter Variables:

let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_suppress_eslintignore = 0
let g:ale_javascript_eslint_suppress_missing_config = 0
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_flow_use_home_config = 0
let g:ale_javascript_jscs_executable = 'jscs'
let g:ale_javascript_jscs_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
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 = 0
let g:ale_fixers = {}
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 = {}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
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 = 1
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) eslint
(started) ['/bin/bash', '-c', '''eslint'' -f unix --stdin --stdin-filename ''/home/ledenyi/roihunter/frontend/roihunter-frontend/src/client/modules/catalog-manager/core/feed/FeedsSettings.js'' < ''/tmp/v01ClJr/3/FeedsSettings.js''']
(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - failure) xo
(finished - exit code 1) ['/bin/bash', '-c', '''eslint'' -f unix --stdin --stdin-filename ''/home/ledenyi/roihunter/frontend/roihunter-frontend/src/client/modules/catalog-manager/core/feed/FeedsSettings.js'' < ''/tmp/v01ClJr/7/FeedsSettings.js''']

<<>>

(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - failure) xo

Most helpful comment

See this FAQ entry for using linters from one language for another language: https://github.com/w0rp/ale#5xii-how-can-i-check-jsx-files-with-both-stylelint-and-eslint See also :help g:ale_linter_aliases. That's if you do want to use some TS linters for JS.

All 2 comments

Current Filetype: javascript

You opened a JS file, and TSLint is for TypeScript code.

TSLint doesn't properly support support on-the-fly checking at the moment. See #925. I currently recommend installing tslint as a tsserver plugin instead. See here: https://github.com/angelozerr/tslint-language-service

See this FAQ entry for using linters from one language for another language: https://github.com/w0rp/ale#5xii-how-can-i-check-jsx-files-with-both-stylelint-and-eslint See also :help g:ale_linter_aliases. That's if you do want to use some TS linters for JS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexlafroscia picture alexlafroscia  路  4Comments

kronos29296 picture kronos29296  路  4Comments

sublee picture sublee  路  3Comments

ianchanning picture ianchanning  路  3Comments

amerov picture amerov  路  4Comments