ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Flow

by 73rhodes ST2/ST3

Flow JavaScript analyzer plugin for SublimeText 2 and 3

Labels linting

Details

  • 2015.01.15.20.26.28
  • github.​com
  • github.​com
  • 2 years ago
  • 38 minutes ago
  • 2 years ago

Installs

  • Total 3K
  • Win 461
  • OS X 2K
  • Linux 367
Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10
Windows 2 2 3 3 1 1 2 6 1 4 6 4 0 0 0 0 2 1 1 1 0 2 1 1 0 1 1 1 3 3 3 4 1 1 0 4 0 2 4 2 1 1 1 1 2 1
OS X 6 5 4 5 6 2 3 4 11 3 8 5 2 2 4 9 4 5 3 3 4 10 7 5 5 1 2 3 5 7 8 2 4 3 0 4 7 7 5 5 1 4 14 9 0 8
Linux 0 1 1 0 0 0 0 1 1 2 3 0 0 0 1 1 2 1 3 0 1 3 0 0 2 5 1 0 0 0 2 0 0 2 2 0 2 2 0 1 1 0 1 2 2 0

Readme

Source
raw.​githubusercontent.​com

Sublime-Flow

A Sublime package for Flow, the static JavaScript analyzer.

  • Run Flow on JavaScript projects from SublimeText
  • Linux and OS X are supported.

Prerequisites

  • Flow must be installed on your system. It's recommended to install flow to /usr/local/bin/.
  • To allow Flow to work in your project directory you must either
    • run flow init in your project directory
    • or create an empty .flowconfig file in your project's root directory

Installation

Using Package Control:

  • Install the Package Control plugin if you don't have it
  • Press Ctrl+Shift+P to bring up the Command Palette (or use Tools > Command Palette menu)
  • Select Package Control: Install Package
  • Type 'Flow' to find Flow for Sublime Text 2 and 3
  • Select 'Flow for Sublime Text 2 and 3' to install

Not using Package Control:

  • Get files from the package archive
  • unzip to your Packages/Flow directory, for example:
    • Linux: ~/.config/sublime-text-2/Packages/JSLint
    • Mac: ~/Library/Application Support/Sublime Text 2/Packages/JSLint
    • Windows: %APPDATA%/Sublime Text 2/Packages/JSLint
  • Relaunch Sublime Text

Usage

Flow checks entire directories. You must run flow init in your project directory, or manually create a .flowconfig file there, before Flow can be used on it.

Any JavaScript files that you want checked with Flow must include the following line in their headers:

/* @flow */

Sublime-Flow includes both a command plug-in and a build system.

There are several ways to run the Flow command:

  • Bring up the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows), then type Flow.
  • Click the Tools > Flow menu entry.
  • Press CTRL+F.

Using the Flow build system:

  • Set the Build System to Flow, then run Build (Command+B on OSX)
  • Alternately, set the Build System to automatic; the Flow build system will be selected for .js files automatically. If another build system has already been configured to work with .js files, this may not work.

Settings

  • Navigate to Preferences > Package Settings > Flow > Settings - Default.
  • To preserve custom settings:
    • copy default settings to Preferences > Package Settings > Flow > Settings - User
    • modify them to your requirements