Code Monkey home page Code Monkey logo

Comments (4)

kaste avatar kaste commented on June 20, 2024

Can you make a short repro repo on GitHub?

from sublimelinter-flow.

TomasBarry avatar TomasBarry commented on June 20, 2024

@kaste, here is a repo you can clone and load in Sublime Text. You'll notice that neither ESLint nor Flow raises any flags even though there should be one for the return type.

Any thoughts on this?

from sublimelinter-flow.

kaste avatar kaste commented on June 20, 2024

You know what?

image

💩

I used the following flowconfig

[ignore]

[include]

[libs]

[lints]

[options]

[strict]

Debug output

SublimeLinter: #68 linter.py:1578     Running ...

  D:\SublimeLinter-flow-issues-73  (working dir)
  > type index.js | D:\SublimeLinter-flow-issues-73\node_modules\.bin\flow.CMD check-contents D:\SublimeLinter-flow-issues-73\index.js --show-all-errors --json

SublimeLinter: #68 linter.py:1155     flow: output:
  [{"flowVersion":"0.102.0","jsonVersion":"1","errors":[{"kind":"infer","level":"error","suppressions":[],"message":[{"context":"const X = (): React.Fragment => (","descr":"Cannot use function type as a type because function type is a value. To get the type of a value use `typeof`.","type":"Blame","loc":{"source":"D:\\SublimeLinter-flow-issues-73\\index.js","type":"SourceFile","start":{"line":5,"column":15,"offset":56},"end":{"line":5,"column":28,"offset":70}},"path":"D:\\SublimeLinter-flow-issues-73\\index.js","line":5,"endline":5,"start":15,"end":28}]}],"passed":false},{}]
SublimeLinter: flow 1 errors. passed: False 
SublimeLinter: flow line: 4, col: 14, level: error, message: React.Fragment (Cannot use function type as a type because function type is a value. To get the type of a value use `typeof`.) 

from sublimelinter-flow.

TomasBarry avatar TomasBarry commented on June 20, 2024

It actually appears to be an issue with older versions of Flow not flagging this as an issue.

from sublimelinter-flow.

Related Issues (20)

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.