Merge pull request #3340 from matklad/fix-lint

Actually gate CI on eslint
This commit is contained in:
Aleksey Kladov 2020-02-27 10:47:43 +01:00 committed by GitHub
commit 9a8329a3a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -110,7 +110,7 @@ jobs:
- run: npm audit - run: npm audit
working-directory: ./editors/code working-directory: ./editors/code
- run: npm run fmt - run: npm run lint
working-directory: ./editors/code working-directory: ./editors/code
- run: npm run package --scripts-prepend-node-path - run: npm run package --scripts-prepend-node-path

View File

@ -23,7 +23,8 @@
"vscode:prepublish": "tsc && rollup -c", "vscode:prepublish": "tsc && rollup -c",
"package": "vsce package -o rust-analyzer.vsix", "package": "vsce package -o rust-analyzer.vsix",
"watch": "tsc --watch", "watch": "tsc --watch",
"fmt": "tsfmt -r && eslint -c .eslintrc.js --ext ts ./src/ --fix" "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src",
"fix": "tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix"
}, },
"dependencies": { "dependencies": {
"jsonc-parser": "^2.1.0", "jsonc-parser": "^2.1.0",

View File

@ -45,7 +45,7 @@ export async function createClient(config: Config, serverPath: string): Promise<
middleware: { middleware: {
// Workaround for https://github.com/microsoft/vscode-languageserver-node/issues/576 // Workaround for https://github.com/microsoft/vscode-languageserver-node/issues/576
async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken, next: DocumentSemanticsTokensSignature) { async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken, next: DocumentSemanticsTokensSignature) {
let res = await next(document, token); const res = await next(document, token);
if (res === undefined) throw new Error('busy'); if (res === undefined) throw new Error('busy');
return res; return res;
} }