Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Linting results are not shown with tree-sitter + flow scope #1630

Open
IanVS opened this issue Oct 9, 2018 · 6 comments
Open

Linting results are not shown with tree-sitter + flow scope #1630

IanVS opened this issue Oct 9, 2018 · 6 comments

Comments

@IanVS
Copy link

IanVS commented Oct 9, 2018

Issue and Steps to Reproduce

ESLint errors are not shown in the diagnostics pane when tree-sitter is enabled and flow is used.

I'm using linter-eslint with default scopes (includes source.js, but not source.flow), and linter package disabled. I noticed that after tree-sitter was enabled by default (I'm using atom-beta), linting stopped working on most of my files. After experimenting, it seems that it's the combination of tree-sitter, flow, and nuclide. See screenshots below. I restarted atom after making changes, to verify all settings are applied correctly. I also noticed that if I add the source.flow scope to linter-eslint and restart, nuclide will report eslint errors. That scope is not required for linter errors to be displayed when using the linter package, so there's definitely something wonky going on in nuclide.

Expected Behavior

Linting results from eslint should be shown in the diagnostics along with flow errors.

Actual Behavior

Only flow errors are shown.

With flow and tree sitter:

image

After removing flow pragma, closing the file, and re-opening:

image

With flow and tree sitter, but using linter instead of nuclide (after a restart of atom):

image

Versions

  • Atom: 1.32.0-beta.3
  • Nuclide: 0.354.0
  • Client OS: macOS

Additional Details

  • Installed packages (apm ls --installed):
❯ apm-beta ls --installed
Community Packages (53) /Users/ianvs/.atom/packages
├── atom-import-js@0.21.0
├── atom-ternjs@0.18.3 (disabled)
├── autocomplete-modules@2.2.2
├── base-16-ocean-dark-ui-theme@1.7.2
├── busy-signal@1.4.3
├── caniuse@0.9.2 (disabled)
├── docblockr@0.13.7
├── editor-settings@1.1.3
├── editorconfig@2.2.2
├── emmet@2.4.3 (disabled)
├── es6-javascript@1.0.0 (disabled)
├── expand-region@0.4.2
├── file-icons@2.1.25
├── flow-ide@1.12.1 (disabled)
├── git-history@3.3.0 (disabled)
├── git-log@0.4.1 (disabled)
├── git-plus@8.1.0 (disabled)
├── git-time-machine@2.1.0 (disabled)
├── highlight-selected@0.14.0
├── hyperclick@0.1.5
├── ide-flowtype-coverage@1.9.2 (disabled)
├── intentions@1.1.5 (disabled)
├── jumpy@5.0.2
├── language-babel@2.85.0
├── language-graphql@0.11.0
├── language-groovy@0.7.0 (disabled)
├── language-ini@1.20.0
├── language-javascript-jsx@0.3.7 (disabled)
├── language-jenkinsfile@0.1.1
├── linter@2.2.0 (disabled)
├── linter-eslint@8.4.1
├── linter-jenkins@1.0.3
├── linter-stylelint@4.3.2
├── linter-ui-default@1.7.1 (disabled)
├── markdown-scroll-sync@2.1.2 (disabled)
├── material-ui@1.0.10
├── minimap@4.29.9
├── minimap-git-diff@4.3.1
├── minimap-linter@2.2.0
├── nuclide@0.354.0
├── open-git-modified-files@0.2.4 (disabled)
├── open-path@0.3.6 (disabled)
├── pigments@0.40.2 (disabled)
├── project-manager@3.3.6 (disabled)
├── regex-railroad-diagram@0.19.4
├── set-syntax@0.4.0 (disabled)
├── sort-lines@0.18.0
├── spacegray-eighties-ui@2.0.0
├── sync-settings@0.8.6
├── tabs-to-spaces@1.0.5
├── tool-bar@1.1.10 (disabled)
├── tree-view-open-files@0.3.0 (disabled)
└── zentabs@0.8.9
@IanVS
Copy link
Author

IanVS commented Oct 9, 2018

Perhaps this is related to facebookarchive/atom-ide-ui#144? Is nuclide only using the first scope? The scopes I'm getting on that file are:

source.flow
source.js

@Chaoste
Copy link

Chaoste commented Nov 1, 2018

I can reproduce this issue but adapting the eslint scope to also listen to flow files doesn't work.

Update: I was wrong. After reinstalling packages, altering the settings, etc. I just figured out that it now just tooks about 10 seconds to show the errors ^^

@IanVS
Copy link
Author

IanVS commented Nov 5, 2018

It seems that in atom 1.33.0-beta1, the source.js scope is no longer included at all in files using flow, which also happened to break all my snippets. (atom/atom#18398)

@gajus
Copy link

gajus commented Nov 12, 2018

@IanVS Did you find a solution to make linting work?

@IanVS
Copy link
Author

IanVS commented Nov 12, 2018

Yes, you can add source.flow to the list of scopes to lint in the linter-eslint settings. In the next release of linter-eslint, it will be included by default.

@gajus
Copy link

gajus commented Nov 12, 2018

Yes, you can add source.flow to the list of scopes to lint in the linter-eslint settings. In the next release of linter-eslint, it will be included by default.

I ended up disabling Nuclide altogether in favour of atom-ide-ui + ide-flowtype.

It appears that linter-eslint is compatible with atom-ide-ui out of the box.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants