Eslint-plugin-react: '+' PropType is defined but prop is never used

Created on 17 Jul 2017  路  4Comments  路  Source: yannickcr/eslint-plugin-react

I don't think immutable object props are supported.

Eslint: 3.19.0
Eslint-plugin-react: 7.0.1

bug flow help wanted

All 4 comments

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

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings