1111
1212"""This module exports the Coffeelint plugin class."""
1313
14- import SublimeLinter .lint
15- from SublimeLinter .lint import NodeLinter , persist , util
14+ from SublimeLinter .lint import NodeLinter , util
1615
1716
1817class Coffeelint (NodeLinter ):
1918 """Provides an interface to coffeelint."""
2019
2120 syntax = ('coffeescript' , 'coffeescript_literate' )
22- executable = 'coffeelint'
2321 npm_name = 'coffeelint'
24- version_args = '--version'
25- version_re = r'(?P<version>\d+\.\d+\.\d+)'
26- version_requirement = '>= 1.4.0'
2722 regex = (
2823 r'^<issue line="(?P<line>\d+)"\s*\r?\n'
2924 r'\s*lineEnd="\d+"\s*\r?\n'
@@ -32,20 +27,17 @@ class Coffeelint(NodeLinter):
3227 r'(?P<message>[^"\n\r]+)["\n\r]'
3328 )
3429 multiline = True
35- comment_re = r'\s*#'
36- config_file = ('-f' , 'coffeelint.json' , '~' )
30+
31+ defaults = {
32+ 'working_dir' : '${file_path}'
33+ }
3734
3835 def cmd (self ):
3936 """Return a tuple with the command line to execute."""
4037
41- command = [self .executable , '--reporter' , 'jslint' , '--stdin' ]
42- api_version = getattr (SublimeLinter .lint , 'VERSION' , 3 )
43- if api_version > 3 :
44- current_syntax = util .get_syntax (self .view )
45- else :
46- current_syntax = persist .get_syntax (self .view )
38+ command = ['coffeelint' , '--reporter' , 'jslint' , '--stdin' ]
4739
48- if current_syntax == 'coffeescript_literate' :
40+ if util . get_syntax ( self . view ) == 'coffeescript_literate' :
4941 command .append ('--literate' )
5042
5143 return command
0 commit comments