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

Fix warnings with FontAwesome5 for web #825

Merged
merged 2 commits into from
Aug 30, 2018

Conversation

soranoba
Copy link
Contributor

2018-08-18 12 07 17
2018-08-18 12 07 33

I fixed them.

@soranoba soranoba force-pushed the fix/fa5-web-warnings branch 2 times, most recently from 5988a6c to 85579b5 Compare August 18, 2018 04:08
@soranoba
Copy link
Contributor Author

soranoba commented Aug 18, 2018

/home/travis/build/oblador/react-native-vector-icons/lib/create-icon-set-from-fontawesome5.js
  153:17  error  'light' is missing in props validation  react/prop-types
  153:24  error  'solid' is missing in props validation  react/prop-types

Because of the above error, I ran yarn upgrade.

@soranoba soranoba force-pushed the fix/fa5-web-warnings branch from 85579b5 to 3dbec64 Compare August 18, 2018 12:07
@oblador
Copy link
Owner

oblador commented Aug 24, 2018

Thanks, deferring to @hampustagerud on this one, but LGTM. Could you revert the change to the yarn.lock file?

@soranoba
Copy link
Contributor Author

If I do not update yarn.lock, eslint is not pass (the above error will occur).
What should I do?

@hampustagerud
Copy link
Collaborator

hampustagerud commented Aug 27, 2018

The fix itself looks fine but upgrading all those packages seems unnecessary to me. Is the warning from the yarn test command? I have tried running it and it passes. There shouldn't be any errors since the properties actually exists in the prop-types object. Can you try removing node_modules and then reinstalling? Or maybe try reverting the yarn.lock changes and see if it passes the CI test?

yarn.lock Outdated
eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"

eslint@^4.3.0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing there is a problem with eslint on your machine cause I can't seem to be able to reproduce it. Maybe try reinstalling node_modules/?

@soranoba soranoba force-pushed the fix/fa5-web-warnings branch from 3dbec64 to 83b408f Compare August 27, 2018 22:55
@soranoba
Copy link
Contributor Author

If you are using npm, the test will pass.
However, If you are using yarn, the test will not pass.

So, the problem is not machine problem.

yarn.lock Outdated
octicons@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/octicons/-/octicons-7.2.0.tgz#a721635f73c774d7ffda56a83a29dbde03fc4b53"
octicons@^8.0.0:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff of this library occurs by executing only the yarn command.

@soranoba
Copy link
Contributor Author

I just updated eslint-plugin-react.

Copy link
Collaborator

@hampustagerud hampustagerud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed how propTypes are created which seems to pass the tests better, could you please try it out? We don't have to force people to upgrade the packges if it works and that would be good 🙂

light: PropTypes.bool,
solid: PropTypes.bool,
});
static propTypes = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this and now both npm and yarn tests passes, please try 🙂

package.json Outdated
@@ -78,7 +78,7 @@
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-react": "^7.11.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still think we can do this without upgrading packages!

Extra fix, never edit code on github.com
@soranoba soranoba force-pushed the fix/fa5-web-warnings branch from 6cc77d8 to a65e0de Compare August 29, 2018 03:19
@soranoba
Copy link
Contributor Author

It's wonderful !!

@hampustagerud
Copy link
Collaborator

Do you think you could remove the changes to yarn.lock and package.json? I'll merge this first thing in the morning! 🙂

@soranoba
Copy link
Contributor Author

I think it is no problem 😃

@hampustagerud hampustagerud merged commit 1be2425 into oblador:master Aug 30, 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.

3 participants