This extension adds Flow support for VS Code. Flow is a static type checker, designed to find type errors in JavaScript programs.
Follow the instructions for VS Code extension installation.
- Flow is supported on Mac, 64-bit Windows, and Linux, follow flowtype.org to get started
- You need a
.flowconfig
in your workspace to enable the flow features - Make sure you are able to run the
flow
command from the command line ( or you haveflow.useNPMPackagedFlow
option intrue
) - Set workspace preference with
"javascript.validate.enable": false
.
flow.pathToFlow
(default: 'flow') path to Flow that will be used for VSCode or Projectflow.stopFlowOnExit
(default: true) stop flow server on exit from Projectflow.enabled
(default: true) you can disable flow for some Project for exampleflow.useNPMPackagedFlow
(default: false) you can also run Flow by defining it in yourpackage.json
- Syntax Coloring
- IntelliSense
- Go to Definition / Peek Definition
- Diagnostics (Errors, Warnings)
- Hover type information
- You should set workspace preference to disable default syntax validation from Visual Studio Code:
"javascript.validate.enable": false
.
First, follow the instructions to setup your launch configuration file, launch.json
.
To use flow-remove-types:
- Follow the flow-remove-type Quick Start.
- In
launch.json
, add"runtimeArgs": ["-r", "flow-remove-types/register"]
to the "launch" configuration.
To use Babel:
- Follow the Babel Quick Start.
- Install babel-register.
- In
.babelrc
, add"retainLines": true
. - In
launch.json
, add"runtimeArgs": ["-r", "babel-register"]
to the "launch" configuration.
This plugin is built on top of Nuclide's Flow support.
- please refer to CONTRIBUTING.md