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

False Positive: "react/prop-types [PROP_NAME] is missing in props validation" when using stateless components + Flow #467

Closed
sstur opened this issue Feb 25, 2016 · 3 comments

Comments

@sstur
Copy link

sstur commented Feb 25, 2016

The issue is only applicable when I name my function argument "props" but if I change that, the warning goes away. See screenshots:

screenshot 2016-02-25 17 47 11

screenshot 2016-02-25 17 48 07

@sstur
Copy link
Author

sstur commented Feb 26, 2016

Wow, so much fix. So many speed. Thanks @yannickcr!

@rosskevin
Copy link
Contributor

rosskevin commented Jun 8, 2016

I'm seeing this issue with 5.1.1 as not fixed or my configuration is wrong.

Here's my eslintrc:

{
  "parser"  : "babel-eslint",
  "extends" : [
    "standard",
    "standard-react"
  ],
  "env"     : {
    "browser" : true
  },
  "globals" : {
    "__DEV__"      : false,
    "__PROD__"     : false,
    "__DEBUG__"    : false,
    "__COVERAGE__" : false,
    "__BASENAME__" : false
  },
  "rules": {
  }
}
/Users/kross/projects/my-relay-starter-kit/src/App.js
  83:13  error  'routes' is missing in props validation   react/prop-types
  83:21  error  'history' is missing in props validation  react/prop-types
~/p/my-relay-starter-kit ❯❯❯ npm ls eslint-plugin-react                                                                                                                                                                                                                                                                                           ⏎ master ✭ ✱ ◼
my-relay-starter-kit@0.0.1 /Users/kross/projects/my-relay-starter-kit
└── eslint-plugin-react@5.1.1 

Do you spot anything I'm doing to misconfigure this?

@rosskevin
Copy link
Contributor

FYI - My issue was a bug with flow (nothing with this plugin!): facebook/flow#1908

@ljharb ljharb added the flow label Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants