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
  • 3 years ago
  • 18 minutes ago
  • 3 years ago

Installs

  • Total 5K
  • Win 892
  • OS X 3K
  • Linux 710
Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4
Windows 3 4 5 3 1 1 1 4 1 3 2 2 3 1 5 3 4 1 0 0 0 2 0 3 1 0 1 6 3 2 4 4 4 2 0 7 10 3 1 1 0 4 2 1 2 2
OS X 4 7 8 6 5 5 9 16 9 6 10 5 5 8 7 6 11 8 2 5 10 3 11 12 9 5 4 6 8 5 10 13 7 4 17 28 20 11 4 4 3 9 7 12 6 8
Linux 0 1 3 1 1 0 3 2 2 0 1 1 2 0 2 4 1 2 0 2 0 0 3 4 1 2 1 3 2 4 2 1 0 2 1 3 6 1 3 0 0 2 2 0 3 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