diff options
author | James C. Davis <jamescdavis@gmail.com> | 2022-05-14 23:44:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 12:44:23 +0900 |
commit | 5479b58660906041d67544a025522a39e006b184 (patch) | |
tree | 4c18b6a9a5bbb076279cc4e8a85a4c00c2a16406 /ale_linters/handlebars | |
parent | e6ca599e87a0cfc9efc2fe7dd104a6c61d0bf8e4 (diff) | |
download | ale-5479b58660906041d67544a025522a39e006b184.zip |
support ember-template-lint 4.x (#4200)
* support ember-template-lint 4.x
* update ember-template-lint linter test
Diffstat (limited to 'ale_linters/handlebars')
-rw-r--r-- | ale_linters/handlebars/embertemplatelint.vim | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ale_linters/handlebars/embertemplatelint.vim b/ale_linters/handlebars/embertemplatelint.vim index 8362bb1c..17c4d08e 100644 --- a/ale_linters/handlebars/embertemplatelint.vim +++ b/ale_linters/handlebars/embertemplatelint.vim @@ -11,10 +11,17 @@ function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort endfunction function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer, version) abort - " Reading from stdin was introduced in ember-template-lint@1.6.0 - return ale#semver#GTE(a:version, [1, 6, 0]) - \ ? '%e --json --filename %s' - \ : '%e --json %t' + if ale#semver#GTE(a:version, [4, 0, 0]) + " --json was removed in favor of --format=json in ember-template-lint@4.0.0 + return '%e --format=json --filename %s' + endif + + if ale#semver#GTE(a:version, [1, 6, 0]) + " Reading from stdin was introduced in ember-template-lint@1.6.0 + return '%e --json --filename %s' + endif + + return '%e --json %t' endfunction function! ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck(buffer) abort |