Skip to content

natesilva/tslint.tmbundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSLint TextMate Bundle

Use the TSLint TypeScript validator in TextMate 2.

TSLint problems in the TextMate gutter

Features

  • Validate automatically when you save your file, and on-demand.
  • Auto-fix problems using the TSLint --fix command.
  • Clickable problem icons are displayed in the TextMate gutter.
  • Optionally get a detailed problem report by pressing Shift-Ctrl-V.

Use TSLint to auto-fix problems

Optional validation report

Install

First install TSLint:

  • In your project
    • npm install --save-dev tslint typescript
  • Or globally
    • [sudo] npm install -g tslint typescript

(Optional) Create a starter configuration: tslint --init

Now install the bundle:

  1. Download the latest release .zip file.
  2. Extract it and double-click to install in TextMate.

FAQ

  • How do I get TypeScript syntax highlighting?
  • How do I run the --fix command?
    • Call up the TextMate “Select Bundle Item” shortcut (Ctrl-Cmd-T) and search for “Fix”.
  • Which version of TSLint is used?
    • Whichever version you have installed locally in your project. If you don’t have it installed locally, then whichever version was installed globally.
  • Why doesn’t the validator include its own copy of TSLint?
    • Because it might be outdated or the wrong version. Best practice is to install tslint locally in your project, so that all of your developers are on the same version.
  • Shouldn’t you be using Visual Studio Code?
    • If there is an “official” text editor for writing TypeScript, it would have to be VS Code. It includes rich Intellisense auto-completion and is itself written in TypeScript. But some developers prefer TextMate, and they need linting support.