Code Monkey home page Code Monkey logo

linter.tmbundle's Introduction

Linter.tmbundle

Provides Linting functionality to TextMate to make it easier to write better quality code.

Features

  • 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's scopeProperties (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 types
    • bundle.linter.strip-whitespace-on-save automatically strips trailing whitespace on save
    • bundle.linter.ensure-newline-on-save automatically adds a training newline on save
    • bundle.linter.fix-on-save automatically fixes lints if possible (e.g. with RuboCop)

Linters

Bash

  • bash -n (found in LINTER_BASH, BASH or PATH environment variables)
  • shellcheck (brew install shellcheck, found in LINTER_SHELLCHECK, SHELLCHECK or PATH environment variables)

JSON

  • JSON.parse in Ruby (found in LINTER_RUBY, RUBY or PATH environment variables)
  • jsonlint (brew install jsonlint, found in LINTER_JSONLINT, JSONLINT or PATH environment variables)

Markdown

  • list of hedge words
  • alex (brew install alex, found in LINTER_ALEX, ALEX or PATH environment variables)
  • write-good (brew install write-good, found in LINTER_ALEX, ALEX or PATH environment variables)

Ruby

  • ruby -wc (found in LINTER_RUBY, RUBY or PATH environment variables)
  • rubocop (gem install --user rubocop, found in LINTER_RUBOCOP, RUBOCOP or PATH environment variables)

Installation

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone https://github.com/MikeMcQuaid/Linter.tmbundle

Status

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.

Patches welcome.

Maintainers

@MikeMcQuaid

License

Linter.tmbundle is under the MIT License. The full license text is available in LICENSE.txt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.