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

Create .eslintrc to resolve #64 #69

Merged
merged 3 commits into from
Jun 11, 2018

Conversation

stunstunstun
Copy link
Contributor

I would like to phase out the issues #64

First of all, We can find that is missing in props validation

.eslintrc

  "rules": {
    "react/prop-types": ["warn", { "ignore": ["children"] }]
  }

If all props are validated, how about replacing the warn level with the error?

@ryanflorence
Copy link
Member

Let's not ignore children, since sometimes they are functions and that's useful to type

@stunstunstun
Copy link
Contributor Author

@ryanflorence +1

And below are the remaining warnings.

/router/src/index.js
   44:19  warning  'children' is missing in props validation      react/prop-types
  125:16  warning  'children' is missing in props validation      react/prop-types
  136:25  warning  'url' is missing in props validation           react/prop-types
  136:30  warning  'children' is missing in props validation      react/prop-types
  174:7   warning  'location' is missing in props validation      react/prop-types
  175:7   warning  'navigate' is missing in props validation      react/prop-types
  176:7   warning  'basepath' is missing in props validation      react/prop-types
  177:7   warning  'primary' is missing in props validation       react/prop-types
  178:7   warning  'children' is missing in props validation      react/prop-types
  179:7   warning  'baseuri' is missing in props validation       react/prop-types
  180:7   warning  'component' is missing in props validation     react/prop-types
  249:23  warning  'uri' is missing in props validation           react/prop-types
  249:28  warning  'location' is missing in props validation      react/prop-types
  249:38  warning  'component' is missing in props validation     react/prop-types
  302:43  warning  'location' is missing in props validation      react/prop-types
  315:11  warning  'requestFocus' is missing in props validation  react/prop-types
  336:7   warning  'children' is missing in props validation      react/prop-types
  337:7   warning  'style' is missing in props validation         react/prop-types
  339:7   warning  'role' is missing in props validation          react/prop-types
  340:7   warning  'component' is missing in props validation     react/prop-types
  341:7   warning  'uri' is missing in props validation           react/prop-types
  418:16  warning  'navigate' is missing in props validation      react/prop-types
  418:26  warning  'to' is missing in props validation            react/prop-types
  418:30  warning  'from' is missing in props validation          react/prop-types
  418:36  warning  'replace' is missing in props validation       react/prop-types
  418:52  warning  'state' is missing in props validation         react/prop-types
  418:59  warning  'noThrow' is missing in props validation       react/prop-types
  446:16  warning  'path' is missing in props validation          react/prop-types
  446:22  warning  'children' is missing in props validation      react/prop-types

/router/src/index.test.js
   40:15  warning  'children' is missing in props validation  react/prop-types
   41:16  warning  'groupId' is missing in props validation   react/prop-types
   41:25  warning  'children' is missing in props validation  react/prop-types
   48:18  warning  'children' is missing in props validation  react/prop-types
  115:22  warning  'groupId' is missing in props validation   react/prop-types
  115:31  warning  'children' is missing in props validation  react/prop-types
  121:21  warning  'userId' is missing in props validation    react/prop-types
  121:29  warning  'groupId' is missing in props validation   react/prop-types
  142:20  warning  'groupId' is missing in props validation   react/prop-types
  146:25  warning  'splat' is missing in props validation     react/prop-types
  147:19  warning  'userId' is missing in props validation    react/prop-types
  147:27  warning  'groupId' is missing in props validation   react/prop-types
  154:20  warning  'one' is missing in props validation       react/prop-types
  154:25  warning  'two' is missing in props validation       react/prop-types
  154:30  warning  'three' is missing in props validation     react/prop-types
  154:37  warning  'four' is missing in props validation      react/prop-types
  154:43  warning  'five' is missing in props validation      react/prop-types
  374:23  warning  'children' is missing in props validation  react/prop-types
  403:23  warning  'uri' is missing in props validation       react/prop-types
  403:28  warning  'children' is missing in props validation  react/prop-types
  410:22  warning  'uri' is missing in props validation       react/prop-types
  475:21  warning  'children' is missing in props validation  react/prop-types
  475:31  warning  'navigate' is missing in props validation  react/prop-types
  475:41  warning  'userId' is missing in props validation    react/prop-types

@ryanflorence
Copy link
Member

awesome, thanks.

Let's use a comment at the top of the file to not lint proptypes in the test file.

@stunstunstun
Copy link
Contributor Author

@ryanflorence 👌

@ryanflorence ryanflorence merged commit 317a679 into reach:master Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants