React-leaflet: Flow 0.53.1 errors with 1.6.3 .flow files

Created on 22 Aug 2017  Â·  3Comments  Â·  Source: PaulLeCam/react-leaflet

flow check outputs

Error: node_modules/react-leaflet/es/Pane.js.flow:2
  2: // flowlint sketchy-null-string:off
                 ^^^^^^^^^^^^^^^^^^^^^^^ Redundant argument. This argument doesn't change any lint settings.

for each es/ .flow file.

Most helpful comment

fwiw, I ran into this when using flow v0.76.0, and to solve I added the path to the module under the [untyped] section in the flow config file:

[untyped]
# suppresses this issue: https://github.com/PaulLeCam/react-leaflet/issues/364
.*/node_modules/react-leaflet/.*

also, at this time the [untyped] section of the flow config is undocumented (sigh), but there's an issue open with a pull request going here: https://github.com/facebook/flow/issues/6749

All 3 comments

I don't know how Flow handles lints in libraries like this, but it doesn't return any error with the config used in this repo, so you'll probably need to update your own config.

Found the explanation:

lint default is all=off, therefore the message I get as, unlike you, I didn't change lint settings (I didn't have this section - old config).

You're probably on the right side of history ;)

Adding

[lints]
all=warn

fixes the problem (to whom it may concern…)

fwiw, I ran into this when using flow v0.76.0, and to solve I added the path to the module under the [untyped] section in the flow config file:

[untyped]
# suppresses this issue: https://github.com/PaulLeCam/react-leaflet/issues/364
.*/node_modules/react-leaflet/.*

also, at this time the [untyped] section of the flow config is undocumented (sigh), but there's an issue open with a pull request going here: https://github.com/facebook/flow/issues/6749

Was this page helpful?
0 / 5 - 0 ratings