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

'+' PropType is defined but prop is never used #1305

Closed
NullDivision opened this issue Jul 17, 2017 · 4 comments
Closed

'+' PropType is defined but prop is never used #1305

NullDivision opened this issue Jul 17, 2017 · 4 comments

Comments

@NullDivision
Copy link

NullDivision commented Jul 17, 2017

I don't think immutable object props are supported.

Eslint: 3.19.0
Eslint-plugin-react: 7.0.1

@ljharb
Copy link
Member

ljharb commented Jul 17, 2017

Can you provide sample code? What happens with eslint-plugin-react v7.1.0?

@ljharb ljharb added the flow label Jul 17, 2017
@NullDivision
Copy link
Author

NullDivision commented Jul 17, 2017

No change in v7.1.0.

// @flow

import React from 'react';

type Props = {| +a: number, +b: string |};

const MyComp = ({ a, b }: Props) => <div>{a} <span>{b}</span></div>;

export default MyComp;

My best guess is that AST handles flow covariants differently.

@ljharb
Copy link
Member

ljharb commented Jul 17, 2017

What happens if you remove the "exact" pipes? Same error?

@alexzherdev
Copy link
Contributor

This works now with the shared detection, but I think it was originally fixed in #1390.

@ljharb ljharb closed this as completed Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants