Close #2764 - Support the new React filetypes with aliases
This commit is contained in:
parent
b531a4e0b3
commit
e3784c4c4e
3 changed files with 8 additions and 0 deletions
|
@ -12,10 +12,12 @@ let s:linters = {}
|
||||||
let s:default_ale_linter_aliases = {
|
let s:default_ale_linter_aliases = {
|
||||||
\ 'Dockerfile': 'dockerfile',
|
\ 'Dockerfile': 'dockerfile',
|
||||||
\ 'csh': 'sh',
|
\ 'csh': 'sh',
|
||||||
|
\ 'javascriptreact': ['javascript', 'jsx'],
|
||||||
\ 'plaintex': 'tex',
|
\ 'plaintex': 'tex',
|
||||||
\ 'rmarkdown': 'r',
|
\ 'rmarkdown': 'r',
|
||||||
\ 'rmd': 'r',
|
\ 'rmd': 'r',
|
||||||
\ 'systemverilog': 'verilog',
|
\ 'systemverilog': 'verilog',
|
||||||
|
\ 'typescriptreact': ['typescript', 'tsx'],
|
||||||
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
|
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
|
||||||
\ 'vimwiki': 'markdown',
|
\ 'vimwiki': 'markdown',
|
||||||
\ 'vue': ['vue', 'javascript'],
|
\ 'vue': ['vue', 'javascript'],
|
||||||
|
|
|
@ -1041,10 +1041,12 @@ g:ale_linter_aliases *g:ale_linter_aliases*
|
||||||
{
|
{
|
||||||
\ 'Dockerfile': 'dockerfile',
|
\ 'Dockerfile': 'dockerfile',
|
||||||
\ 'csh': 'sh',
|
\ 'csh': 'sh',
|
||||||
|
\ 'javascriptreact': ['javascript', 'jsx'],
|
||||||
\ 'plaintex': 'tex',
|
\ 'plaintex': 'tex',
|
||||||
\ 'rmarkdown': 'r',
|
\ 'rmarkdown': 'r',
|
||||||
\ 'rmd': 'r',
|
\ 'rmd': 'r',
|
||||||
\ 'systemverilog': 'verilog',
|
\ 'systemverilog': 'verilog',
|
||||||
|
\ 'typescriptreact': ['typescript', 'tsx'],
|
||||||
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
|
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
|
||||||
\ 'vimwiki': 'markdown',
|
\ 'vimwiki': 'markdown',
|
||||||
\ 'vue': ['vue', 'javascript'],
|
\ 'vue': ['vue', 'javascript'],
|
||||||
|
|
|
@ -66,3 +66,7 @@ Execute(The defaults for the verilog filetype should be correct):
|
||||||
let g:ale_linters_explicit = 1
|
let g:ale_linters_explicit = 1
|
||||||
|
|
||||||
AssertEqual [], GetLinterNames('verilog')
|
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')
|
||||||
|
|
Reference in a new issue