Skip to content

Commit

Permalink
cleanup, inline config deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Dec 29, 2017
1 parent 4340013 commit bededf8
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 139 deletions.
14 changes: 0 additions & 14 deletions .sublimelinterrc

This file was deleted.

78 changes: 14 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,33 @@ SublimeLinter-flow

[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-flow.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-flow)

This linter plugin for [SublimeLinter][docs] provides an interface to [flow](http://flowtype.org/), a static type checker for JavaScript. It will be used with files that have the “JavaScript” syntax.
This linter plugin for [SublimeLinter](http://sublimelinter.readthedocs.org) provides an interface to [flow](http://flowtype.org/) (0.1.0 or later), a static type checker for JavaScript. It will be used with files that have the “JavaScript” syntax.

## Installation
SublimeLinter 3 must be installed in order to use this plugin. If SublimeLinter 3 is not installed, please follow the instructions [here][installation].
SublimeLinter must be installed in order to use this plugin.

### Linter installation
Before using this plugin, you must ensure that `flow` is installed on your system. To install `flow`, follow the instructions here:
Please use [Package Control](https://packagecontrol.io) to install the linter plugin.

[Getting started with Flow](http://flowtype.org/docs/getting-started.html#installing-flow)

In order for this linter to work you will need to run the `flow init` command in your project or manually create a `.flowconfig` file.
In order for `flow` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. The docs cover [troubleshooting PATH configuration](http://sublimelinter.readthedocs.io/en/latest/troubleshooting.html#finding-a-linter-executable).

**Note:** This plugin requires `flow` 0.1.0 or later.

### Linter configuration
In order for `flow` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. Before going any further, please read and follow the steps in [“Finding a linter executable”](http://sublimelinter.readthedocs.org/en/latest/troubleshooting.html#finding-a-linter-executable) through “Validating your PATH” in the documentation.

Once you have installed and configured `flow`, you can proceed to install the SublimeLinter-flow plugin if it is not yet installed.



### Plugin installation
Please use [Package Control][pc] to install the linter plugin. This will ensure that the plugin will be updated when new versions are available. If you want to install from source so you can modify the source code, you probably know what you are doing so we won’t cover that here.

To install via Package Control, do the following:

1. Within Sublime Text, bring up the [Command Palette][cmd] and type `install`. Among the commands you should see `Package Control: Install Package`. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins.

1. When the plugin list appears, type `flow`. Among the entries you should see `SublimeLinter-flow`. If that entry is not highlighted, use the keyboard or mouse to select it.

## Settings
For general information on how SublimeLinter works with settings, please see [Settings][settings]. For information on generic linter settings, please see [Linter Settings][linter-settings].
- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

In addition to the standard SublimeLinter settings, SublimeLinter-flow provides its own settings. Those marked as “Inline Setting” may also be [used inline][inline-settings].
Additional SublimeLinter-flow settings:

|Setting|Description|Inline Setting|
|:------|:----------|:------------:|
|lib|Add a path to your interface files. [More info](http://flowtype.org/docs/third-party.html#interface-files)| |
|show-all-errors|It allows flow to output all errors instead of stopping at 50| |
|flow-bin|Allows to specify the path to the flow executable| |
|coverage|Shows flow coverage warnings|✓|
|all|runs flow against all files regardless of `@flow` comment|✓|
|Setting|Description|
|:------|:----------|
|lib|Add a path to your interface files. [More info](http://flowtype.org/docs/third-party.html#interface-files)|
|show-all-errors|It allows flow to output all errors instead of stopping at 50|
|flow-bin|Allows to specify the path to the flow executable|
|coverage|Shows flow coverage warnings|
|all|runs flow against all files regardless of `@flow` comment|

### Warning

At this moment, using `all` in a medium to big sized node.js project may cause a **crash**. It's recommended to use `flow` incrementally, one file at a time.

Use with caution.

## Contributing
If you would like to contribute enhancements or fixes, please do the following:

1. Fork the plugin repository.
1. Hack on a separate topic branch created from the latest `master`.
1. Commit and push the topic branch.
1. Make a pull request.
1. Be patient. ;-)

Please note that modifications should follow these coding guidelines:

- Indent is 4 spaces.
- Code should pass flake8 and pep257 linters.
- Vertical whitespace helps readability, don’t be afraid to use it.
- Please use descriptive variable names, no abbreviations unless they are very well known.

Thank you for helping out!

[docs]: http://sublimelinter.readthedocs.org

[installation]: http://sublimelinter.readthedocs.org/en/latest/installation.html

[pc]: https://sublime.wbond.net/installation

[cmd]: http://docs.sublimetext.info/en/sublime-text-3/extensibility/command_palette.html

[settings]: http://sublimelinter.readthedocs.org/en/latest/settings.html

[linter-settings]: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

[inline-settings]: http://sublimelinter.readthedocs.org/en/latest/settings.html#inline-settings
8 changes: 1 addition & 7 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"install": "messages/install.txt",
"2.0.0": "messages/2.0.0",
"2.1.0": "messages/2.1.0",
"3.0.0": "messages/3.0.0",
"3.1.0": "messages/3.1.0",
"4.0.0": "messages/4.0.0",
"4.1.0": "messages/4.1.0",
"4.2.0": "messages/4.2.0"
"4.3.0": "messages/4.3.0.txt"
}
14 changes: 0 additions & 14 deletions messages/2.0.0

This file was deleted.

4 changes: 0 additions & 4 deletions messages/2.1.0

This file was deleted.

6 changes: 0 additions & 6 deletions messages/3.0.0

This file was deleted.

6 changes: 0 additions & 6 deletions messages/3.1.0

This file was deleted.

7 changes: 0 additions & 7 deletions messages/4.0.0

This file was deleted.

7 changes: 0 additions & 7 deletions messages/4.1.0

This file was deleted.

6 changes: 0 additions & 6 deletions messages/4.2.0

This file was deleted.

6 changes: 6 additions & 0 deletions messages/4.3.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SublimeLinter-flow
------------------
Inline settings will be deprecated in SublimeLinter 4. Please use flow's
own configuration files and inline comments instead.

https://github.com/SublimeLinter/SublimeLinter3/blob/next/messages/4.0.0-rc.1.txt
5 changes: 1 addition & 4 deletions messages/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ SublimeLinter-flow
-------------------------------
This linter plugin for SublimeLinter provides an interface to flow.

** IMPORTANT! **

Before this plugin will activate, you *must*
follow the installation instructions here:
Please read the installation instructions at:

https://github.com/SublimeLinter/SublimeLinter-flow

0 comments on commit bededf8

Please sign in to comment.