Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow errors #197

Closed
stevenmusumeche opened this issue Jun 17, 2017 · 1 comment
Closed

Flow errors #197

stevenmusumeche opened this issue Jun 17, 2017 · 1 comment
Labels

Comments

@stevenmusumeche
Copy link

  • polished version: 1.1.3
  • JSS-in_CSS library and version: styled-components:2.0.1
  • Any relevant JS library and version: React 15.5.4

Mixin/Helper/Shortand you were using and how you were using it:

import { darken } from 'polished';

What you are seeing:

400+ flow errors.

embed/node_modules/polished/lib/color/parseToRgb.js.flow:56
56: alpha: parseFloat(${rgbaMatched[4]}, 10),
^^ unused function argument
19: declare function parseFloat(string: mixed): number;
^^^^^^^^^^^^^^^^^^^^^^^ function type expects no more than 1 argument. See lib: /private/tmp/flow/flowlib_3515cb84/core.js:19

embed/node_modules/polished/lib/color/parseToRgb.js.flow:83
83: alpha: parseFloat(${hslaMatched[4]}, 10),
^^ unused function argument
19: declare function parseFloat(string: mixed): number;
^^^^^^^^^^^^^^^^^^^^^^^ function type expects no more than 1 argument. See lib: /private/tmp/flow/flowlib_3515cb84/core.js:19

What you expected to see:

Either no flow errors from the library, or documentation (like in styled components repo) on how to configure flow to ignore these errors while still allowing the library to be used with flow.

@bhough
Copy link
Contributor

bhough commented Jun 20, 2017

Thank you for filing the issue @stevenmusumeche.

We've created #200, #201, and #202 as action items out of this issue. We'd love help with any of the items if you are interested.

Closing in favor of above mentioned issues.

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

No branches or pull requests

2 participants