JavaScript happiness style on-save in TextMate 2.
Use XO to manage your project's coding style, and make sure each save is conforming to style rules.
Recommended installation is via tmb, the TM Bundles manager.
$ tmb install claylo/XOStay current with:
$ tmb update XOIf that's not your thing, you may also install directly from git.
cd ~/Library/Application\ Support/Avian/Bundles
git clone git://github.com/claylo/XO.tmbundle.gitBefore using this bundle, you must ensure that XO is installed on your system. You may install XO globally, or in your project. These steps demonstrate installing it globally.
- Install Node.js
- Install XO
$ npm install --global xoIf configuration for XO is stored in the project's package.json file, XO.tmbundle will pick up that configuration correctly (as of v1.1.0). If XO control is needed but not desired in package.json, the TM_XO and TM_XO_OPTIONS bundles are supported in any .tm_properties file. For example:
TM_XO = "$TM_PROJECT_DIRECTORY/node_modules/.bin/xo"
TM_XO_OPTIONS = "--space --esnext"
Without TM_XO specified, /usr/bin/env xo is used to run the command.
ISC @ Clay Loveless
