Skip to content

Commit 0454c6e

Browse files
authored
Merge pull request #37 from revig/linter-v2-upgrade
Upgrade to Linter v2
2 parents 751e3f3 + d8c2461 commit 0454c6e

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

lib/main.coffee

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports =
6464
provider =
6565
grammarScopes: ['source.livecodescript', 'source.iRev', 'source.lcb']
6666
scope: 'file'
67-
lintOnFly: true
67+
lintsOnChange: true
6868
lint: (textEditor) =>
6969
filePath = textEditor.getPath()
7070
command = @executablePath
@@ -88,13 +88,20 @@ module.exports =
8888
while((match = regex.exec(output)) isnt null)
8989
line = match[1]-1
9090
messages.push
91-
type: "Error"
92-
filePath: filePath
93-
range: [
94-
[line, match[2]-0],
95-
[line, textEditor.getBuffer().lineLengthForRow(line)]
96-
]
97-
text: match[3]
91+
severity: 'error'
92+
location:
93+
file: filePath
94+
position: [
95+
[
96+
line
97+
match[2] - 0
98+
]
99+
[
100+
line
101+
textEditor.getBuffer().lineLengthForRow(line)
102+
]
103+
]
104+
excerpt: match[3]
98105
return messages
99106

100107
exec: (command, args = [], options = {}) ->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"providedServices": {
1212
"linter": {
1313
"versions": {
14-
"1.0.0": "provideLinter"
14+
"2.0.0": "provideLinter"
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)