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-saveautomatically runs Linter on save for supported file typesbundle.linter.strip-whitespace-on-saveautomatically strips trailing whitespace on savebundle.linter.ensure-newline-on-saveautomatically adds a training newline on savebundle.linter.fix-on-saveautomatically fixes lints if possible (e.g. with RuboCop)
bash -n(found inLINTER_BASH,BASHorPATHenvironment variables)shellcheck(brew install shellcheck, found inLINTER_SHELLCHECK,SHELLCHECKorPATHenvironment variables)
JSON.parsein Ruby (found inLINTER_RUBY,RUBYorPATHenvironment variables)jsonlint(brew install jsonlint, found inLINTER_JSONLINT,JSONLINTorPATHenvironment variables)
- list of hedge words
alex(brew install alex, found inLINTER_ALEX,ALEXorPATHenvironment variables)write-good(brew install write-good, found inLINTER_ALEX,ALEXorPATHenvironment variables)
ruby -wc(found inLINTER_RUBY,RUBYorPATHenvironment variables)rubocop(gem install --user rubocop, found inLINTER_RUBOCOP,RUBOCOPorPATHenvironment variables)
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone https://github.com/MikeMcQuaid/Linter.tmbundleThe 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.