-
Couldn't load subscription status.
- Fork 49.7k
[eprh] Fix config type not being exported correctly #34746
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
Conversation
Another attempt to fix #34745.
|
Comparing: 1be3ce9...79c720c Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Another attempt to fix #34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks DiffTrain build for [c786258](c786258)
Another attempt to fix facebook#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks DiffTrain build for [c786258](facebook@c786258)
|
@poteto I encountered a problem with this ESM syntax, when consumed from a TypeScript Aside from that issue above, some other users have reported problems with the new types in #34845 too. After testing it out (and based on Are the types wrong? and my prior experience PRing this to other libraries), I think the solution may be to use |
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> Resolve the type error with the types, according to [Are the types wrong?](https://arethetypeswrong.github.io/?p=eslint-plugin-react-hooks%407.0.0), as an additional - Last attempt: #34746 - Original issue: #34745 ## How did you test this change? I edited `node_modules/eslint-plugin-react-hooks/index.d.ts` in my `"module": "Node16"` + `"type": "module"` project and my error went away: - #34801 (comment) cc @poteto @michaelfaith @andrewbranch <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> Resolve the type error with the types, according to [Are the types wrong?](https://arethetypeswrong.github.io/?p=eslint-plugin-react-hooks%407.0.0), as an additional - Last attempt: #34746 - Original issue: #34745 ## How did you test this change? I edited `node_modules/eslint-plugin-react-hooks/index.d.ts` in my `"module": "Node16"` + `"type": "module"` project and my error went away: - #34801 (comment) cc @poteto @michaelfaith @andrewbranch <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> DiffTrain build for [6b344c7](6b344c7)
Another attempt to fix #34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues:
export * from './cjs/eslint-plugin-react-hooks'in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports