From 9fa460fcfc233329795fe75ea2f5873cd121a653 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Mon, 24 Feb 2020 23:55:03 +0900 Subject: Update eslint-server (vscode-eslint) to version 2 --- installer/install-eslint-language-server.cmd | 26 ++++++++++----------- installer/install-eslint-language-server.sh | 2 +- settings/eslint-language-server.vim | 35 +++++++++++++++------------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index 846638d..4f14a5a 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -1,13 +1,13 @@ -@echo off - -git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/1.9.1 -call npm install -call npm run compile:server - -echo @echo off ^ - -node %%~dp0\server\out\eslintServer.js --stdio %%* ^ - -> eslint-language-server.cmd - +@echo off + +git clone "https://github.com/microsoft/vscode-eslint" . +git checkout release/2.0.15 +call npm install +call npm run compile:server + +echo @echo off ^ + +node %%~dp0\server\out\eslintServer.js --stdio %%* ^ + +> eslint-language-server.cmd + diff --git a/installer/install-eslint-language-server.sh b/installer/install-eslint-language-server.sh index 05beeb3..21b2673 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/1.9.1 +git checkout release/2.0.15 npm install npm run compile:server diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index 7377846..9f6a590 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -8,25 +8,28 @@ augroup vimlsp_settings_eslint_language_server \ 'whitelist': lsp_settings#get('eslint-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'typescript.tsx']), \ 'blacklist': lsp_settings#get('eslint-language-server', 'blacklist', []), \ 'config': lsp_settings#get('eslint-language-server', 'config', lsp_settings#server_config('eslint-language-server')), - \ 'workspace_config': { - \ 'validate': v:true, + \ 'workspace_config': lsp_settings#get('eslint-language-server', 'workspace_config', { + \ 'validate': 'probe', \ 'packageManager': 'npm', - \ 'autoFix': v:true, - \ 'autoFixOnSave': v:true, + \ 'codeActionOnSave': { + \ 'enable': v:true, + \ 'mode': 'all', + \ }, + \ 'codeAction': { + \ 'disableRuleComment': { + \ 'enable': v:true, + \ 'location': 'separateLine', + \ }, + \ 'showDocumentation': { + \ 'enable': v:true, + \ }, + \ }, + \ 'format': v:false, + \ 'quiet': v:false, + \ 'onIgnoredFiles': 'off', \ 'options': {}, \ 'run': 'onType', \ 'nodePath': v:null, - \ 'quiet': v:false, - \ 'workspaceFolder': v:null, - \ 'codeAction': { - \ 'disableRuleComment': { - \ 'enable': v:true, - \ 'location': 'separateLine' - \ }, - \ 'showDocumentation': { - \ 'enable': v:true - \ } - \ } - \ }, + \ }), \ } augroup END -- cgit v1.2.3-54-g00ecf From 77a23c538d471f3ebc7f0cb3d162e8a1b12c9765 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 00:46:03 +0900 Subject: Workaround for build error due to "Unsupported Platform" in fsevents --- installer/install-eslint-language-server.cmd | 1 + installer/install-eslint-language-server.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index 4f14a5a..ee71b53 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -3,6 +3,7 @@ git clone "https://github.com/microsoft/vscode-eslint" . git checkout release/2.0.15 call npm install +call npm --prefix ./server install ./server call npm run compile:server echo @echo off ^ diff --git a/installer/install-eslint-language-server.sh b/installer/install-eslint-language-server.sh index 21b2673..df6e4f9 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -3,6 +3,7 @@ git clone "https://github.com/microsoft/vscode-eslint" . git checkout release/2.0.15 npm install +npm --prefix ./server install ./server npm run compile:server cat <eslint-language-server -- cgit v1.2.3-54-g00ecf From 6ae88c37f5c8a1afc4149c32d7fc03e3898c3d94 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 00:59:34 +0900 Subject: fix indent --- settings/eslint-language-server.vim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index 9f6a590..f6dd6e3 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -15,15 +15,15 @@ augroup vimlsp_settings_eslint_language_server \ 'enable': v:true, \ 'mode': 'all', \ }, - \ 'codeAction': { - \ 'disableRuleComment': { - \ 'enable': v:true, - \ 'location': 'separateLine', - \ }, - \ 'showDocumentation': { - \ 'enable': v:true, - \ }, - \ }, + \ 'codeAction': { + \ 'disableRuleComment': { + \ 'enable': v:true, + \ 'location': 'separateLine', + \ }, + \ 'showDocumentation': { + \ 'enable': v:true, + \ }, + \ }, \ 'format': v:false, \ 'quiet': v:false, \ 'onIgnoredFiles': 'off', -- cgit v1.2.3-54-g00ecf