├── .gitignore ├── .python-version ├── .travis.yml ├── LICENSE ├── README.md ├── linter.py ├── messages.json └── messages ├── 1.0.3.txt └── install.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.8 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.6" 4 | install: 5 | - pip install flake8 6 | script: 7 | - flake8 . --max-line-length=120 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SublimeLinter-coffee 2 | ========================= 3 | 4 | [![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-coffee.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-coffee) 5 | 6 | This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to the [coffeescript compiler](http://coffeescript.org). 7 | It will be used with files that have the "CoffeeScript" syntax. 8 | 9 | ## Installation 10 | 11 | SublimeLinter must be installed in order to use this plugin. 12 | 13 | Please use [Package Control](https://packagecontrol.io) to install the linter plugin. 14 | 15 | To install `coffee`, do the following: 16 | 17 | 1. Install [Node.js](http://nodejs.org) (and [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) on Linux). 18 | 19 | 1. Install `coffee` by typing the following in a terminal: 20 | ``` 21 | npm install -g coffee-script 22 | ``` 23 | 24 | 1. If you are using `nvm` and `zsh`, ensure that the line to load `nvm` is in `.zshenv` and not `.zshrc`. 25 | 26 | Please make sure that the path to `coffee` is available to SublimeLinter. 27 | The docs cover [troubleshooting PATH configuration](http://sublimelinter.com/en/latest/troubleshooting.html#finding-a-linter-executable). 28 | 29 | ### Settings 30 | 31 | - SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html 32 | - Linter settings: http://sublimelinter.com/en/latest/linter_settings.html 33 | -------------------------------------------------------------------------------- /linter.py: -------------------------------------------------------------------------------- 1 | from SublimeLinter.lint import Linter, util 2 | 3 | 4 | class Coffee(Linter): 5 | cmd = 'coffee --compile --stdio' 6 | regex = ( 7 | r'^.+?:(?P\d+):(?P\d+): (?:(?Perror)|(?Pwarning)): (?P[^\r\n]+)' 8 | ) 9 | error_stream = util.STREAM_STDERR 10 | defaults = { 11 | 'selector': 'source.coffee' 12 | } 13 | -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "install": "messages/install.txt", 3 | "1.0.3": "messages/install.txt" 4 | } 5 | -------------------------------------------------------------------------------- /messages/1.0.3.txt: -------------------------------------------------------------------------------- 1 | SublimeLinter-coffee 1.0.3 2 | ------------------------------- 3 | Please note that for technical reasons, this plugin cannot lint 4 | literate coffeescript. 5 | 6 | I recommend using SublimeLinter-coffeelint, it's a better linter. 7 | -------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | SublimeLinter-coffee 2 | ------------------------------- 3 | This linter plugin for SublimeLinter provides an interface to coffee. 4 | 5 | Please read the installation instructions at: 6 | 7 | https://github.com/SublimeLinter/SublimeLinter-coffee 8 | --------------------------------------------------------------------------------