diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim index 167dab1c..a85f06e2 100644 --- a/autoload/ale/linter.vim +++ b/autoload/ale/linter.vim @@ -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'], diff --git a/doc/ale.txt b/doc/ale.txt index 9e4af075..832c2707 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -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'], diff --git a/test/test_filetype_linter_defaults.vader b/test/test_filetype_linter_defaults.vader index af028041..9c40cb23 100644 --- a/test/test_filetype_linter_defaults.vader +++ b/test/test_filetype_linter_defaults.vader @@ -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')