Provides Linting functionality to TextMate to make it easier to write better quality code.
- Linting on request of Bash, JSON, Markdown and Ruby files
- Strips trailing whitespace on request from the end of lines (except after Ruby
__END__
blocks) - Adds trailing newlines on request to the end of files missing them
- If set in
.tm_properties
'sscopeProperties
(space separated, set either globally or for a given language like[ source.ruby ]
):bundle.linter.lint-on-save
automatically runs Linter on save for supported file typesbundle.linter.strip-whitespace-on-save
automatically strips trailing whitespace on savebundle.linter.ensure-newline-on-save
automatically adds a training newline on savebundle.linter.fix-on-save
automatically fixes lints if possible (e.g. with RuboCop)
bash -n
(found inLINTER_BASH
,BASH
orPATH
environment variables)shellcheck
(brew install shellcheck
, found inLINTER_SHELLCHECK
,SHELLCHECK
orPATH
environment variables)
JSON.parse
in Ruby (found inLINTER_RUBY
,RUBY
orPATH
environment variables)jsonlint
(brew install jsonlint
, found inLINTER_JSONLINT
,JSONLINT
orPATH
environment variables)
- list of hedge words
alex
(brew install alex
, found inLINTER_ALEX
,ALEX
orPATH
environment variables)write-good
(brew install write-good
, found inLINTER_ALEX
,ALEX
orPATH
environment variables)
ruby -wc
(found inLINTER_RUBY
,RUBY
orPATH
environment variables)rubocop
(gem install --user rubocop
, found inLINTER_RUBOCOP
,RUBOCOP
orPATH
environment variables)
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone https://github.com/MikeMcQuaid/Linter.tmbundle
The above features work for my day-to-day use.
Tested using TextMate 2. May work in TextMate 1 or Sublime Text; I've no idea.
Linter.tmbundle is under the MIT License. The full license text is available in LICENSE.txt.