Close #2764 - Support the new React filetypes with aliases

This commit is contained in:
w0rp 2019-09-19 20:48:30 +01:00
parent b531a4e0b3
commit e3784c4c4e
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
3 changed files with 8 additions and 0 deletions

View File

@ -12,10 +12,12 @@ let s:linters = {}
let s:default_ale_linter_aliases = {
\ 'Dockerfile': 'dockerfile',
\ 'csh': 'sh',
\ 'javascriptreact': ['javascript', 'jsx'],
\ 'plaintex': 'tex',
\ 'rmarkdown': 'r',
\ 'rmd': 'r',
\ 'systemverilog': 'verilog',
\ 'typescriptreact': ['typescript', 'tsx'],
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
\ 'vimwiki': 'markdown',
\ 'vue': ['vue', 'javascript'],

View File

@ -1041,10 +1041,12 @@ g:ale_linter_aliases *g:ale_linter_aliases*
{
\ 'Dockerfile': 'dockerfile',
\ 'csh': 'sh',
\ 'javascriptreact': ['javascript', 'jsx'],
\ 'plaintex': 'tex',
\ 'rmarkdown': 'r',
\ 'rmd': 'r',
\ 'systemverilog': 'verilog',
\ 'typescriptreact': ['typescript', 'tsx'],
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
\ 'vimwiki': 'markdown',
\ 'vue': ['vue', 'javascript'],

View File

@ -66,3 +66,7 @@ Execute(The defaults for the verilog filetype should be correct):
let g:ale_linters_explicit = 1
AssertEqual [], GetLinterNames('verilog')
Execute(Default aliases for React should be defined):
AssertEqual ['javascript', 'jsx'], ale#linter#ResolveFiletype('javascriptreact')
AssertEqual ['typescript', 'tsx'], ale#linter#ResolveFiletype('typescriptreact')