Code Monkey home page Code Monkey logo

linter-flow's Introduction

AtomLinter Website

Adding a Linter Provider

Made a linter provider? Great! We'd love to include it in our list! Just follow this step-by-step process and you're provider will make it to our webpage in no time.

  • Open the content/data/providers.yml file on GitHub.
  • Press the Pencil Icon in the upper Right Corner of the Code Preview.
  • Add your provider to the correct category, following the following structure:
- title: { linter-provider }
  url: { linter-url }
  • Save your commit, and submit your pull request.

linter-flow's People

Contributors

anaisbetts avatar arcanemagus avatar arnaud-dezandee avatar despairblue avatar greenkeeper[bot] avatar greenkeeperio-bot avatar kevinsawicki avatar maletor avatar martomi avatar nmn avatar patrys avatar steelbrain avatar strax avatar torifat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

linter-flow's Issues

Many `flow check` processes spawned

Is this a problem?

$ ps aux | grep flow | wc -l
      0

(command-S to save file)

$ ps aux | grep flow | wc -l
      10
$ ps aux | grep flow | wc -l
      18

Saving the file more times just yields more spawned processes:

$ ps aux | grep flow | wc -l
      45

ps is filled with the exact same command:

user              50294  12.1  0.1 25844924  17432   ??  U     3:50PM   0:00.06 /usr/local/bin/flow check --json /path/to/file.js --all

Running the command manually reveals that the flow check command hangs.

join us

You can transfer it to the AtomLinter org if you'd like. You'll still be the maintainer.
The sooner you do it, the less the statistics of downloads you will lose)
flow:

  1. run apm unpublish linter-flow command to unpublish package
  2. move repo to AtomLInter org (you will be an administrator)
  3. fix repo url in package.json
  4. publish again

This allows us to more easily keep track of linters that need to be fixed after major updates to the core linter. Additionally, by pulling you into the organization it allows us to keep linter creators up to date with changes and plans people have to advance the project. Lastly it has been a good tool when people have issues with the linters where users can rely on a larger stable of developers to help them with their issues on any given linter.

This is not working

Sorry for not being more specific, butI don't know what's wrong.
I've set the correct flow path /usr/local/bin/flow, and when I run /usr/local/bin/flow or just flow in the console on the project folder it finds the errors in my code, but nothing is shown on the linter...
I'm using linter-eslint and that works properly.
Any idea?

Keep a Change Log

It would be helpful to know what's changing between versions. Especially with major version changes.

I follow https://keepachangelog.org for my projects and the burden is very low.

Thanks for your effort!

Flow server isn't spawned even when path is set -- fails silently

Symptoms:

  1. When I didn't define the path then I got an error telling me it was unable to start the server, even though the path is defined globally.
  2. If I purposely set the path incorrectly then I got an error telling me it couldn't spawn the process.
  3. If I set the path correctly then it looks like it's spawning, but I never get any linting errors, including non Flow linting errors, and if I do ps -ef | grep flow I can see the server hasn't actually started.

This isn't really specific to linter-flow because I got the same problem in ide-flow too. I'm running Linux so it maybe a Linux only issue.

Fix:
This comment made me wonder if I my problem was also because I wasn't starting Atom from the command line, and sure enough starting Atom from the command line fixed my problem! I no longer need to explicitly set the Flow path either.

Question:
I'm really opening this issue to help anybody else that encounters the same problem, but I'd quite like to know which environment variables are required so that I can potentially change my Atom app launcher to define those environment variables?

When closing js tabs Linter Flow throws an error

[Enter steps to reproduce below:]

  1. Close an open javascript file tab

Atom Version: 0.176.0
System: Microsoft Windows 8.1
Thrown From: linter-flow package, v0.1.3

Stack Trace

Uncaught TypeError: Bad argument

At child_process.js:1130

TypeError: Bad argument
  at TypeError (native)
  at ChildProcess.spawn (child_process.js:1130:26)
  at exports.spawn (child_process.js:989:9)
  at LinterFlow.destroy (c:\Users\mesos_000\.atom\packages\linter-flow\lib\linter-flow.coffee:119:5)
  at LinterView.remove (c:\Users\mesos_000\.atom\packages\linter\lib\linter-view.coffee:212:7)
  at c:\Users\mesos_000\.atom\packages\linter\lib\linter-view.coffee:106:8
  at Emitter.module.exports.Emitter.emit (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\node_modules\event-kit\lib\emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.destroyed (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\src\text-editor.js:270:27)
  at TextEditor.module.exports.Model.destroy (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\node_modules\theorist\lib\model.js:218:14)
  at Pane.module.exports.Pane.destroyItem (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\src\pane.js:459:18)
  at HTMLDivElement.<anonymous> (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\node_modules\tabs\lib\tab-bar-view.js:174:22)
  at space-pen-ul.jQuery.event.dispatch (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\node_modules\jquery\dist\jquery.js:4430:9)
  at space-pen-ul.elemData.handle (c:\Users\mesos_000\AppData\Local\atom\app-0.176.0\resources\app\node_modules\jquery\dist\jquery.js:4116:28)

Commands

     -5:02.3 core:confirm (atom-text-editor.editor.mini)
  9x -4:46.8 core:page-down (atom-text-editor.editor)
  2x -2:14.7 core:confirm (atom-text-editor.editor.mini)
     -0:50.7 find-and-replace:show (atom-text-editor.editor)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "Thumbs.db",
      ".meteor"
    ],
    "disabledPackages": [
      "autoflow",
      "background-tips",
      "dev-live-reload",
      "exception-reporting",
      "markdown-preview",
      "open-on-github",
      "package-generator",
      "styleguide",
      "timecop",
      "welcome",
      "update-package-dependencies",
      "symbols-view",
      "file-icons",
      "enhanced-package-list",
      "themed-settings",
      "metrics",
      "git-control",
      "deprecation-cop",
      "linter-flow"
    ],
    "themes": [
      "seti-ui",
      "seti-syntax"
    ],
    "audioBeep": false
  }
}

Installed Packages

# User
alignment, v1.1.3
atom-color-highlight, v3.0.5
atom-ctags, v2.5.5
autocomplete-paths, v1.0.0
autocomplete-plus, v2.0.2
autocomplete-plus-async, v0.22.0
block-cursor, v0.7.3
color-picker, v1.4.4
crosshairs, v0.1.2
git-tab-status, v1.5.3
linter, v0.10.1
linter-csslint, v0.0.11
linter-eslint, v0.3.1
linter-htmlhint, v0.0.8
linter-jscs, v1.4.9
meteor-api, v2.9.0
method-separator, v0.1.3
minimap, v3.5.6
seti-syntax, v0.2.1
seti-ui, v0.6.3
toolbar, v0.0.10
toolbar-main, v0.0.5
windows-context-menu, v0.3.1

# Dev
No dev packages

/cc @atom/core

Arguments.path.join must be strings

Uncaught TypeError: Arguments to path.join must be strings path.js:384
exports.join path.js:384
LinterFlow linter-flow.coffee:87
LinterView.init
Linters linter-view.coffee:61
LinterView

Doesn't show errors in files if flow strip_root setting is on

If your .flowconfig file has strip_root=true in the [options] section, then linter-flow will only show squiggly lines under errors if the file has any unsaved changes.

(I'm not really clear what that setting is good for. Doesn't seem to make any difference in the output of manually running flow. Just found someone had turned it on in a project and I was confused as to why linter-flow was acting weird.)

env: node: No such file or directory

I have flow installed (v 0.18.1) via npm
executable is in /usr/local/bin/flow and is set in settings.
I have a .flowconfig in the project root

When I open a file for linting I get the Error linting check console for details with env: node: No such file or directory.

Any ideas?

Package.getActivationCommands is deprecated.

Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:

  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }
Package.getActivationCommands (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package.js:806:9)
Package.hasActivationCommands (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package.js:731:20)
<unknown> (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package.js:185:24)
Package.measure (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package.js:163:15)
Package.load (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package.js:177:12)
PackageManager.loadPackage (C:\Users\anton_000\AppData\Local\atom\app-0.199.0\resources\app.asar\src\package-manager.js:355:14)

TypeError when file can't be found on start and then on every keypress in that tab

I got this error message in a red notification when I started Atom. When I last started Atom in this directory, I had a file named "foo.js" opened, so Atom started up with a tab for that file, but the file no longer existed. I can reproduce the error by repeating these steps. Then, if you type in the tab, this error fires again on every keypress.

TypeError: Cannot read property 'indexOf' of null
    at Object.lint (/Users/chris/.atom/packages/linter-flow/lib/index.js:81:21)
    at promises.push.Promise.then._this.emitter.emit.linter (/Users/chris/.atom/packages/linter/lib/linter-registry.js:63:26)
    at /Users/chris/.atom/packages/linter/lib/linter-registry.js:62:23
    at Set.forEach (native)
    at LinterRegistry.lint (/Users/chris/.atom/packages/linter/lib/linter-registry.js:60:18)
    at /Users/chris/.atom/packages/linter/lib/linter.coffee:98:16
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/chris/.atom/packages/linter/lib/editor-linter.js:80:22
    at /Users/chris/.atom/packages/linter/lib/helpers.coffee:23:18

Bottom status bar?

Hi

I am using this package and it works great. Only problem I have is that the bottom status bar shown in the screenshot does no appear for me, so sometimes if I have errors towards the bottom of a long file, I am not aware of them. Is there anyway I can see the bottom bar whenever I have errors?

Uncaught SyntaxError: Unexpected token C

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.190.0
System: Mac OS X 10.10.3
Thrown From: linter-flow package, v0.1.4

Stack Trace

Uncaught SyntaxError: Unexpected token C

At file:///opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2FLeo%2FProjects%2Fbalfear3%22%7D%5D%2C%22bootstrapScript%22%3A%22%2Fopt%2Fhomebrew-cask%2FCaskroom%2Fatom%2Flatest%2FAtom.app%2FContents%2FResources%2Fapp%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fopt%2Fhomebrew-cask%2FCaskroom%2Fatom%2Flatest%2FAtom.app%2FContents%2FResources%2Fapp%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22apiPreviewMode%22%3Afalse%2C%22appVersion%22%3A%220.190.0%22%2C%22initialPaths%22%3A%5B%22%2FUsers%2FLeo%2FProjects%2Fbalfear2%22%2C%22%2FUsers%2FLeo%2FProjects%2Fbalfear3%22%5D%7D:1

SyntaxError: Unexpected token C
  at Object.parse (native)
  at Socket.<anonymous> (/Users/Leo/.atom/packages/linter-flow/lib/linter-flow.coffee:35:19)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -0:32.0 application:add-project-folder (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:18.2 fuzzy-finder:toggle-file-finder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:16.8 editor:consolidate-selections (atom-text-editor.editor.mini)
     -0:16.8 core:cancel (atom-text-editor.editor.mini)
     -0:04.4 pane:show-previous-item (atom-text-editor.editor.vim-mode.command-mode)
     -0:03.8 core:close (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:03.4 pane:show-previous-item (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:03.1 pane:show-next-item (atom-text-editor.editor.vim-mode.command-mode)
     -0:02.0 pane:show-previous-item (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:01.6 pane:show-next-item (atom-text-editor.editor.vim-mode.command-mode)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ],
    "disabledPackages": [
      "minimap",
      "jshint",
      "highlight-line",
      "atom-lint",
      "linter",
      "linter-jshint"
    ]
  }
}

Installed Packages

# User
atom-color-highlight, v3.0.8
atom-typescript, v2.14.0
autoclose-html, v0.15.0
autocomplete-clang, v0.6.4
autocomplete-css, v0.6.0
autocomplete-html, v0.5.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.9.0
autocomplete-snippets, v1.2.0
color-picker, v1.6.0
docblockr, v0.6.3
editorconfig, v0.3.3
file-icons, v1.5.4
git-log, v0.3.0
git-projects, v1.13.0
git-tab-status, v1.6.0
highlight-selected, v0.9.1
javascript-snippets, v1.0.0
jsformat, v0.7.18
language-SCSS, v0.2.0
language-elixir, v0.4.0
language-erlang, v2.0.0
language-haml, v0.19.0
language-jade, v0.3.0
language-swift, v0.3.0
linter, v0.12.0
linter-clang, v2.25.1
linter-coffeelint, v0.2.1
linter-csslint, v0.0.11
linter-elixirc, v0.2.1
linter-erlc, v0.2.0
linter-flow, v0.1.4
linter-haml, v0.1.1
linter-hlint, v0.3.1
linter-htmlhint, v0.0.12
linter-js-yaml, v1.0.0
linter-jscs, v1.10.0
linter-less, v0.3.1
linter-rubocop, v0.2.2
linter-ruby, v0.1.4
linter-scss-lint, v0.0.14
linter-swiftc, v0.2.2
linter-tslint, v0.2.1
markdown-format, v2.5.0
meteor-api, v2.12.0
open-last-project, v0.3.5
permute, v0.1.0
pretty-json, v0.3.2
project-manager, v1.15.5
react, v0.11.2
script, v2.18.0
tabs-to-spaces, v0.9.2
text-manipulation, v0.4.0
vim-mode, v0.43.0
wakatime, v4.0.1

# Dev
No dev packages

Doesn't show errors in files in /tmp on OS X

/tmp/foo/foo.js

/* @flow */

var x = 9;
console.log(x.length);

Assuming Atom is opened in /tmp/foo, and flow init has been run in the directory. Running flow shows the error, but linter-flow doesn't show any issues in the file /tmp/foo/foo.js. It reports 1 issue in the project in the status bar. Clicking the "1 issue" button causes /private/tmp/foo/foo.js to be opened, which shows the same contents, with a red squiggly line correctly appearing under length on the last line. Atom seems to believe they're separate files but they seem to be the same thing.

In OS X, /tmp appears to be a symlink to private/tmp, but I can't reproduce this issue with regular symlinked directories that I create.

Look into supporting more ES6 with Babel

Here's the idea:
When the plugin boots up, it creates a copy of the entire project in the /tmp folder by passing it through Babel. While doing this, Babel is carefully configured to only transpile the features not supported by flow.

Then, the flow command is run on the transpiled version of the code instead. While typing, Babel will be used to convert the code before being fed into the flow-cli as well.

Using minimal transpilation, there can probably be some work done to maintain line-numbers.

Using this technique, we can support features such as:

  1. Decorators
  2. Generators
  3. :: methods.

Object.activate is deprecated.

AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API

Object.activate (/Users/chris/.atom/packages/linter/lib/main.coffee:57:8)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:240:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:221:30)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:213:14)
PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:452:21)

Errors/warnings only detected for files that are in an unsaved state

Steps to reproduce (for me, anyway):

  1. Open a saved file that is known to contain flow errors. Linter displays no errors.
  2. Start typing anything. Linter immediately starts displaying all errors.
  3. Either undo or manually bring the file back to its saved state and the linter errors disappear again.
  4. Start typing again so that the errors once again show up.
  5. Save the file. Errors immediately disappear.

Atom, my flow binary, and this plugin are all up to date (1.6.0, 0.22.1, and 5.0.0 respectively). Mac OS X 10.9.5.

linter-flow spawning 12 instances upon opening a project

When I open a project when linter-flow is enabled, my CPU starts working really hard and when I check Activity Monitor, I see that there are 12 instances of flow running. Is this expected? How can I use Flow and/or linter-flow without burning up my CPU?

screen shot 2015-12-16 at 8 41 36 pm

Uncaught TypeError: Arguments to path.join must be strings

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.189.0
System: Mac OS X 10.10.2
Thrown From: linter-flow package, v0.1.4

Stack Trace

Uncaught TypeError: Arguments to path.join must be strings

At path.js:449

TypeError: Arguments to path.join must be strings
  at Object.posix.join (path.js:449:13)
  at new LinterFlow (/Users/thibaultmaekelbergh/Dropbox/Mackup/.atom/packages/linter-flow/lib/linter-flow.coffee:105:40)
  at LinterView.initLinters (/Users/thibaultmaekelbergh/Dropbox/Mackup/.atom/packages/linter/lib/linter-view.coffee:51:27)
  at /Users/thibaultmaekelbergh/Dropbox/Mackup/.atom/packages/linter/lib/linter-view.coffee:103:8
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.handleGrammarChange (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2811:27)
  at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:200:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TokenizedBuffer.module.exports.TokenizedBuffer.setGrammar (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:168:27)
  at DisplayBuffer.module.exports.DisplayBuffer.setGrammar (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1091:35)
  at TextEditor.module.exports.TextEditor.setGrammar (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2412:33)
  at GrammarListView.module.exports.GrammarListView.confirmed (/Applications/Atom.app/Contents/Resources/app/node_modules/grammar-selector/lib/grammar-list-view.js:60:21)
  at GrammarListView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:242:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:552:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:392:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)

Commands

     -0:02.0 grammar-selector:show (atom-text-editor.editor)
     -0:01.5 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "jslint",
      "emmet",
      "unregistered",
      "compass",
      "quippet",
      "autocomplete-paths",
      "autocomplete-plus"
    ],
    "themes": [
      "yeti-ui",
      "kimbie-light"
    ],
    "ignoredNames": [
      "node_modules",
      ".DS_Store",
      "npm-debug.log"
    ]
  }
}

Installed Packages

# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
atom-html-preview, v0.1.6
atom-spotify, v1.2.0
compare-files, v0.4.1
editor-stats, v0.17.0
editorconfig, v0.3.3
error-status, v0.3.3
file-icons, v1.5.2
git-log, v0.3.0
gulp-snippets, v0.6.1
iTunes, v0.2.0
jsonlint, v1.0.2
kimbie-light, v1.0.1
language-swift, v0.3.0
laravel, v0.4.2
linter, v0.12.0
linter-flow, v0.1.4
linter-jshint, v0.1.0
linter-php, v0.0.12
linter-scss-lint, v0.0.14
remote-edit, v1.7.2
remote-sync, v2.4.1
ssh-config, v0.10.0
travis-ci-status, v0.13.0
web-browser, v1.4.2
yeti-ui, v0.1.6

# Dev
No dev packages

Notifications [Close All] button doesn't work

Every time when I start up Atom on a project with Flow, these notifications appear for a few seconds and block access to some of my tabs. There's a [Close All] button on them which seems like it would be handy, but it doesn't work. (Are these notifications maybe provided by linter or Atom itself? Maybe the issue should be for one of them.)

screen shot 2015-12-11 at 2 40 21 pm

Better handling for flow comment tag

Currently the linter only works if it can fine the /* @flow */ comment in the file.

Flow itself does this, but has an option to lint all files. Add an option to deal with this better.

Support for Hack

I'm not a hack developer. Would love some help adding support.

Fail on Windows (flow 0.19.1)

using flow 0.19.1 on windows fail. It seems that the output is not redirected properly.

Note: even outside atom, flow complains about Error: Tail.open_in_opt: Couldn't open file but then, output properly the source code errors.

this what I see in Atom:

Error: Tail.open_in_opt: Couldn't open file [2016-04-19 14:03:04] Initializing Server (This might take some time)

[2016-04-19 14:03:04] executable=e:\npm\npm\flow.exe

[2016-04-19 14:03:04] version=0.19.1

[2016-04-19 14:03:04] Parsing

[2016-04-19 14:03:04] Running local inference

[2016-04-19 14:03:04] Calculating dependencies

[2016-04-19 14:03:04] Merging

[2016-04-19 14:03:04] Server is READY

[2016-04-19 14:03:04] Took 0.297000 seconds to initialize.

[2016-04-19 14:03:04] Status: Error
    at ChildProcess.<anonymous> (C:\Users\me\.atom\packages\linter-flow\node_modules\atom-linter\node_modules\sb-exec\lib\index.js:33:20)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

External server detected

I'm having an issue where the linter is not working for me. I'm pointing to flow in the settings using the full path /usr/local/bin/flow. When I open a file with /* @flow */ I get a blue message that flow is starting then another blue message that an external server was found. Flow will then work for a couple second before I get: http://cl.ly/0B3k200k2W2C

If I use flow via the command line it returns the correct output quickly and reliably, not sure what is going on.

Add Naman Goel as a maintainer

This repo is abandoned and needs a maintainer. Because of this being unmaintained, Naman Goel (@nmn) has made a fork linter-flow-plus and is maintaining it, I vote for him to be the maintainer of this repo.
Continuing from nmn/linter-flow-plus#3
cc @AtomLinter/owners

Update .flowconfig message

Currently if .flowconfig is missing an Info level toast is shown saying "Missing .flowconfig file.", it would help users new to flow (who have failed to read the instructions ๐Ÿ˜›) if this message said something along the lines of "Run flow init in this directory to set the default options.".

Uncaught SyntaxError: Unexpected token F

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.194.0
System: Mac OS X 10.10.3
Thrown From: linter-flow package, v0.1.4

Stack Trace

Uncaught SyntaxError: Unexpected token F

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Fdrk%2Fdev%2Fnerdwallet%2Flife-events%22%7D%5D%2C%22bootstrapScript%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22apiPreviewMode%22%3Afalse%2C%22appVersion%22%3A%220.194.0%22%2C%22shellLoadTime%22%3A534%2C%22initialPaths%22%3A%5B%22%2FUsers%2Fdrk%2Fdev%2Fnerdwallet%2Flife-events%22%5D%7D:1

SyntaxError: Unexpected token F
  at Object.parse (native)
  at Socket.<anonymous> (/Users/drk/.atom/packages/linter-flow/lib/linter-flow.coffee:35:19)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -0:09.2.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.5.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:04.2.0 refactor:done (atom-text-editor.editor.is-focused)
     -0:04.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:04.1.0 refactor:done (atom-text-editor.editor.is-focused)
     -0:04.1.0 editor:newline (atom-text-editor.editor.is-focused)
  4x -0:02.1.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "monokai-syntax-for-one-dark"
    ],
    "disabledPackages": [
      "linter-js-standard"
    ]
  }
}

Installed Packages

# User
autocomplete-css, v0.6.0
autocomplete-plus, v2.12.0
color-picker, v1.7.0
editorconfig, v1.0.0
file-icons, v1.5.4
file-types, v0.3.0
js-refactor, v0.3.0
linter, v0.12.1
linter-flow, v0.1.4
monokai-syntax-for-one-dark, v0.2.2
pigments, v0.1.2
refactor, v0.4.1
symbols-tree-view, v0.9.2

# Dev
No dev packages

giant "merge_strict_job THROWS: ... Failure('hd')" error message about once a minute

linter-flow had been working well for me, but then I decided to create a new file, and I started getting an error about once a minute from linter-flow. It doesn't let me copy the text from the error message, so here's a screenshot:

screen shot 2015-11-23 at 2 58 51 pm

Flow run from the command line reports "No errors!" so I can't see it being a problem with my code.

Closing the tab and restarting Atom doesn't fix it. The error message still mentions the same filename. I'm not sure why or how it's stuck on considering that file now.

Uncaught TypeError: Cannot read property 'getPath' of undefined

it's back =(

Atom Version: 0.181.0
System: linux 3.13.0-45-generic
Thrown From: linter-flow package, v0.1.4

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /home/burabure/.atom/packages/linter-flow/lib/linter-flow.coffee:27

TypeError: Cannot read property 'getPath' of undefined
  at LinterFlow.lintFile (/home/burabure/.atom/packages/linter-flow/lib/linter-flow.coffee:27:46)
  at /home/burabure/.atom/packages/linter/lib/linter-view.coffee:158:18
  at Array.forEach (native)
  at /home/burabure/.atom/packages/linter/lib/linter-view.coffee:157:18
  at FSReqWrap.oncomplete (fs.js:100:15)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-edark-syntax"
    ],
    "disabledPackages": [
      "linter-jshint"
    ]
  }
}

Installed Packages

# User
atom-color-highlight, v3.0.8
autocomplete-paths, v1.0.2
autocomplete-plus, v2.2.0
base16-edark-syntax, v0.0.0
emmet, v2.3.6
file-icons, v1.5.1
jsonlint, v1.0.2
language-liquid, v0.2.0
linter, v0.12.0
linter-coffeelint, v0.2.1
linter-eslint, v0.5.0
linter-flow, v0.1.4
linter-htmlhint, v0.0.12
react, v0.11.2
script, v2.18.0
symbols-tree-view, v0.9.1
wakatime, v4.0.1

# Dev
No dev packages

flowServer not working

I couldn't get linter-flow to work without changing

flowServer = spawn(@flowpath, ['start', '--all', '--module', 'node', path.resolve(atom.project.path)])

to

flowServer = spawn(@flowpath, ['start', '--all', path.resolve(atom.project.path)])

better support for when .flowconfig isn't at project root

Right now if you are only using flow in a sub-directory of your project the linter will fail. Ideally when opening a file the linter would find the .flowconfig file in the nearest parent directory, start a flow server for that directory if one isn't already open, then poll the flow server for errors in that directory.

Detect .flowconfig

If the .flowconfig file is missing, the plugin currently fires a stupid warning on the first line of the file.

Detect is the file exists or not, and provide a better error message instead. Also, add a setting to enable/disable this error.

Uncaught TypeError: Bad argument

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.176.0
System: Mac OS X 10.10.1
Thrown From: linter-flow package, v0.1.3

Stack Trace

Uncaught TypeError: Bad argument

At child_process.js:1130

TypeError: Bad argument
  at TypeError (native)
  at ChildProcess.spawn (child_process.js:1130:26)
  at exports.spawn (child_process.js:989:9)
  at LinterFlow.destroy (/Users/fruardum/.atom/packages/linter-flow/lib/linter-flow.coffee:119:5)
  at LinterView.remove (/Users/fruardum/.atom/packages/linter/lib/linter-view.coffee:212:7)
  at /Users/fruardum/.atom/packages/linter/lib/linter-view.coffee:106:8
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:270:27)
  at TextEditor.module.exports.Model.destroy (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:218:14)
  at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:459:18)
  at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:436:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:716:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:760:21)
  at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:292:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:170:20)

Commands

     -3:21.7 core:select-all (atom-text-editor.editor)
     -3:19.5 copy-as-rtf:copy (atom-text-editor.editor)
     -3:15.4 command-palette:toggle (atom-text-editor.editor)
  4x -3:09.4 copy-as-rtf:copy (atom-text-editor.editor)
     -1:26.5 core:select-all (atom-text-editor.editor)
     -1:23.7 copy-as-rtf:copy (atom-text-editor.editor)
     -0:42.2 deprecation-cop:view (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
  2x -0:07.1 core:close (atom-text-editor.editor)

Config

{
  "core": {
    "followSymlinks": true,
    "disabledPackages": [
      "composer",
      "behat-atom"
    ]
  }
}

Installed Packages

# User
atom-lint, v0.20.1
autocomplete-plus, v2.0.2
coffee-lint, v0.7.3
copy-as-rtf, v0.5.0
git-log, v0.2.0
git-tab-status, v1.5.3
jsonlint, v1.0.0
language-twig, v1.5.2
linter, v0.10.1
linter-csslint, v0.0.11
linter-flow, v0.1.3
linter-haml, v0.1.0
linter-php, v0.0.11
linter-rubocop, v0.2.1
linter-ruby, v0.1.4
linter-scss-lint, v0.0.11
php-twig, v3.0.0
phpunit, v1.0.9
phpunit-snippets, v0.1.0
project-manager, v1.15.4
rsense, v0.6.0
ruby-block-converter, v3.1.0
script, v2.16.0
slash-closer, v0.7.1
symbols-tree-view, v0.4.0
symfony-snippets, v0.3.0

# Dev
No dev packages

/cc @atom/core

Bad argument

Seems like #8 but that is very old. I'm on release v3.1.0.

TypeError: Bad argument
  at TypeError (native)
  at ChildProcess.spawn (internal/child_process.js:274:26)
  at exports.spawn (child_process.js:343:9)
  at /Users/jasonkuhrt/.atom/packages/linter-flow/build/index.js:90:50
  at Object.lint (/Users/jasonkuhrt/.atom/packages/linter-flow/build/index.js:89:16)
  at Promise.then._this.emitter.emit.linter (/Users/jasonkuhrt/.atom/packages/linter/lib/linter-registry.coffee:59:22)
  at LinterRegistry.triggerLinter (/Users/jasonkuhrt/.atom/packages/linter/lib/linter-registry.coffee:58:16)
  at /Users/jasonkuhrt/.atom/packages/linter/lib/linter-registry.coffee:52:17
  at Array.map (native)
  at /Users/jasonkuhrt/.atom/packages/linter/lib/linter-registry.coffee:50:27
(anonymous function) @ /Users/jasonkuhrt/.atom/packages/linter-flow/build/index.js:121

Warning when importing css file

Hi!
When I import a css file there is a warning:

./index.css Required module not found

/* @flow */
import './index.css';

For JavaScript imports it works as expected. I didn't try other file types.

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. Open some files
  2. Close all files by holding in cmd + W

Atom Version: 0.177.0
System: Mac OS X 10.10.2
Thrown From: linter-flow package, v0.1.3

Stack Trace

Uncaught Error: spawn EACCES

At child_process.js:1160

Error: spawn EACCES
  at exports._errnoException (util.js:753:11)
  at ChildProcess.spawn (child_process.js:1160:11)
  at exports.spawn (child_process.js:993:9)
  at LinterFlow.destroy (/Users/Andersos/.atom/packages/linter-flow/lib/linter-flow.coffee:119:5)
  at LinterView.remove (/Users/Andersos/.atom/packages/linter/lib/linter-view.coffee:281:7)
  at /Users/Andersos/.atom/packages/linter/lib/linter-view.coffee:111:8
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:270:27)
  at TextEditor.module.exports.Model.destroy (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:218:14)
  at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:459:18)
  at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:436:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:716:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:760:21)
  at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:292:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:170:20)

Commands

 20x -0:01.3 core:close (atom-text-editor.editor)

Config

{
  "core": {
    "disabledPackages": [
      "language-sql"
    ]
  }
}

Installed Packages

# User
atom-handlebars, v0.4.0
autocomplete-plus, v2.0.11
color-gutter, v0.3.1
editorconfig, v0.3.0
linter, v0.11.1
linter-csslint, v0.0.11
linter-flow, v0.1.3
linter-htmlhint, v0.0.8
linter-jscs, v1.4.9
linter-jshint, v0.1.0
linter-jsxhint, v0.1.0
linter-less, v0.3.1
linter-scss-lint, v0.0.11
linter-shellcheck, v0.0.6
linter-tidy, v0.0.1
travis-ci-status, v0.11.2

# Dev
No dev packages

/cc @atom/core

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.