From d8c2461fa82207a7229495c1f9b614408445b7d2 Mon Sep 17 00:00:00 2001 From: Ralf Bitter Date: Sun, 10 Mar 2019 19:38:42 +0100 Subject: [PATCH] Upgrade to Linter v2 --- lib/main.coffee | 23 +++++++++++++++-------- package.json | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/main.coffee b/lib/main.coffee index 44b09a0..c017073 100644 --- a/lib/main.coffee +++ b/lib/main.coffee @@ -64,7 +64,7 @@ module.exports = provider = grammarScopes: ['source.livecodescript', 'source.iRev', 'source.lcb'] scope: 'file' - lintOnFly: true + lintsOnChange: true lint: (textEditor) => filePath = textEditor.getPath() command = @executablePath @@ -88,13 +88,20 @@ module.exports = while((match = regex.exec(output)) isnt null) line = match[1]-1 messages.push - type: "Error" - filePath: filePath - range: [ - [line, match[2]-0], - [line, textEditor.getBuffer().lineLengthForRow(line)] - ] - text: match[3] + severity: 'error' + location: + file: filePath + position: [ + [ + line + match[2] - 0 + ] + [ + line + textEditor.getBuffer().lineLengthForRow(line) + ] + ] + excerpt: match[3] return messages exec: (command, args = [], options = {}) -> diff --git a/package.json b/package.json index 3bcc964..774ab60 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "providedServices": { "linter": { "versions": { - "1.0.0": "provideLinter" + "2.0.0": "provideLinter" } } }