Skip to content


coffeescript linter with style warnings #118

wants to merge 1 commit into from

6 participants


Additional coffeescript linter based on coffeelint

Didn't want to modify the existing as it shows compile errors pretty nicely whereas coffeelint is more for style

NB the --stdin lint arg is awaiting this


Cool, thanks for taking the time to do it. However I won't merge it until you merge this with the existing and add a "coffeescript_linter" setting which determines which linter to use, otherwise there is no easy way for the user to decide which linter to use for coffeescript syntax.

In addition, it would be nice to create some new commands listed in Default.sublime-commands that would lint the current view using coffescript or coffeelint. You would only enable those commands if the current syntax is CoffeeScript.


Will do. Apologies for the hackishness of the merge - was being a bit overly pragmatic as my main focus was on developing the coffeescript code that this was being tested on. This extension was just a happy side product.

Just thought: It might be useful to have the option to have multiple linters per language (which I had earlier assumed without checking the code). In the case of coffeescript there's a fairly distinct difference between the two linters, and they could be quite complementary if used together.


Multiple linters could be useful, true. Make a ticket for the idea, maybe someone will implement it.


What's the status of this?


+1 on implementing this.. would def like to see coffeelint support in addition to coffee -l -s

@jswartwood jswartwood referenced this pull request

Add CoffeeLint support #226


Any update on this one?




SublimeLinter 3 has landed, should be available on Package Control soon, along with a coffeelint linter and support for multiple linters.

@aparajita aparajita closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 31 additions and 0 deletions.
  1. +31 −0 sublimelinter/modules/
31 sublimelinter/modules/
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+# - sublimelint package for checking coffee files
+# based on, inspired by
+import re
+import os
+from base_linter import BaseLinter
+ 'language': 'coffeescript',
+ 'executable': 'coffeelint.cmd' if == 'nt' else 'coffeelint',
+ 'lint_args': '--stdin'
+class Linter(BaseLinter):
+ def parse_errors(self, view, errors, lines, errorUnderlines,
+ violationUnderlines, warningUnderlines, errorMessages,
+ violationMessages, warningMessages):
+ for line in errors.splitlines():
+ match = re.match(r'#(?P<line>\d+) : (?P<type>[a-z]+) : (?P<err>.+)',
+ line)
+ if match:
+ line, err_text = int('line')),'err')
+ err_type ='type')
+ grp = errorMessages if err_type == 'error' else warningMessages
+ self.add_message(line, lines, err_text, grp)
Something went wrong with that request. Please try again.