-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Feature/UpgradeReactIsPackage #2300
Conversation
(Bugfix in eslint v6.7)
…irectly useful for us as of `react-is` `v16.12`
@lamhieu-vk it is a lint error here: enzyme: > eslint --ext js,jsx . "--quiet"
enzyme-adapter-react-14: /home/travis/build/airbnb/enzyme/packages/enzyme-adapter-react-14/src/ReactFourteenAdapter.js
enzyme-adapter-react-14: 117:22 error Do not depend on the return value from ReactDOM.render react/no-render-return-value
enzyme-adapter-react-14: ✖ 1 problem (1 error, 0 warnings) I don't know why the lint task passed locally but you can find the suggested fix here: |
I don't change anything in that files :< |
hi @ljharb , after |
@lamhieu-vk I'm not sure that logic needs to change as it uses an older version of ReactDOM that will always return a value from the render method. If anything, this logic needs to be refactored in the latest adapters: It seems this does not cause a lint error in CI yet so it's probably not a pressing issue now and can be handled later. |
It's ready to review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll restructure the commits and get this in.
@@ -133,6 +133,7 @@ class ReactThirteenAdapter extends EnzymeAdapter { | |||
}; | |||
const ReactWrapperComponent = createMountWrapper(el, { ...options, adapter }); | |||
const wrappedEl = React.createElement(ReactWrapperComponent, wrapperProps); | |||
// eslint-disable-next-line react/no-render-return-value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's disable this in each package's .eslintrc (https://github.com/airbnb/enzyme/blob/master/packages/enzyme-adapter-react-13/.eslintrc) rather than inline, since it's disabling being OK depends on the react version.
however, i'm not seeing this as a warning or an error locally - why include it?
2827ef4
to
7fd4295
Compare
7fd4295
to
8b94a44
Compare
thanks for fixing this @lamhieu-vk and @ljharb. Are there any plans to do an enzyme release to get this out soon? |
- [fix] `isMemo` and `isLazy` are no longer directly useful for us as of `react-is` `v16.12` (#2300) - [deps] update `enzyme-shallow-equal`, `enzyme-adapter-utils`, `object-values`, `react-is` - [meta] add `funding` field - [dev deps] update `eslint`, `eslint-plugin-import`, `eslint-plugin-markdown`, `eslint-plugin-react`, `safe-publish-latest`
v3.11.0 has been released, as have relevant adapters. |
@ljharb thanks so much ^^ |
Awesome thanks |
I updated to the new version of
react-is@16.12
, it had some disruptions and I fixed it.