weixin_40001924
weixin_40001924
2020-11-25 07:56

Error seen when running `eslint` in command line but not in VSCode

I use eslint-plugin-flowtype-errors to integrate flow into eslint. Errors can be got from flow typecheck when running eslint in terminal, but nothing shows up in VSCode. And it is even more puzzled that errors other than those from flow can be detected and displayed as usual...

Any thoughts on what's wrong here?

该提问来源于开源项目:microsoft/vscode-eslint

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_40001924 weixin_40001924 5月前

    Yes, I tried to use yarn in the test repo but no luck since my project I'm working on is managed by npm. And the output of ESLint shows that the library is loaded: snipaste_20170807_191922 snipaste_20170807_191947 Also, Tried using npm, globally/locally installed flow-bin and eslint with related plugins just now. Same result.

    Edit: Details and grammar.

    点赞 评论 复制链接分享
  • weixin_40001924 weixin_40001924 5月前

    Reinstall VSCode(64bit) and finally find that I accidentally installed the 32bit version of VSCode. Now it's working. Thank you for your aid!

    Maybe a tip may help other people like me?

    点赞 评论 复制链接分享
  • weixin_39754398 weixin_39754398 5月前

    Using npm shows:

    capture

    点赞 评论 复制链接分享
  • weixin_39754398 weixin_39754398 5月前

    Actually no. Would you be able to share a setup that I can copy / clone. Then I can have a look and understand why this doesn't work.

    点赞 评论 复制链接分享
  • weixin_40001924 weixin_40001924 5月前

    https://github.com/wontoncc/bug-test A minimal project to reproduce the situation. And I'm on Windows 10, if that matters.

    
    .\node_modules\.bin\eslint app.js
    

    should get errors from locally installed flow, but no errors in VSCode.

    点赞 评论 复制链接分享
  • weixin_39754398 weixin_39754398 5月前

    are you using yarn to install the npm modules. If so this is very likely a dup of: https://github.com/Microsoft/vscode-eslint/issues/187

    点赞 评论 复制链接分享

相关推荐