We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4ecd091 + c04b67b commit 62e87d9Copy full SHA for 62e87d9
1 file changed
linter.py
@@ -11,7 +11,8 @@
11
12
"""This module exports the Coffeelint plugin class."""
13
14
-from SublimeLinter.lint import Linter, persist
+import SublimeLinter
15
+from SublimeLinter.lint import Linter, persist, util
16
17
18
class Coffeelint(Linter):
@@ -37,8 +38,14 @@ def cmd(self):
37
38
"""Return a tuple with the command line to execute."""
39
40
command = [self.executable_path, '--reporter', 'jslint', '--stdin']
41
+ api_version = getattr(SublimeLinter, 'VERSION', 3)
42
- if persist.get_syntax(self.view) == 'coffeescript_literate':
43
+ if api_version > 3:
44
+ current_syntax = util.get_syntax(self.view)
45
+ else:
46
+ current_syntax = persist.get_syntax(self.view)
47
+
48
+ if current_syntax == 'coffeescript_literate':
49
command.append('--literate')
50
51
return command
0 commit comments