-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Investigate what happened to unhandled rejection #4194
Comments
FYI, according to this ci run, the lint error was: /home/travis/build/facebook/create-react-app/packages/react-error-overlay/src/utils/getStackFrames.js |
I think the question here is what changed that made that error appear? |
Yeah, just wanted to note the error here to hopefully save someone some time figuring out why it appeared :) (as in ... obviously, it's a valid error, but why did it just start appearing?) |
Could it be because of https://github.com/facebook/create-react-app/pull/4187/files? https://eslint.org/docs/rules/no-unused-vars says that
However, that PR uses the UPDATE: I think I've figured out what's going on. eslint/eslint#8040 (comment) seems to confirm that the previous code should've passed eslint. function getStackFrames(
error: Error,
unhandledRejection: boolean = false,
contextSize: number = 3
): Promise<StackFrame[] | null> {
// ...
} However, eslint/eslint#8459 seems to have broken it, because I took the current master, reverted the commit (including the new test cases), added a new test case similar to the issue we're having, and it passed (and it does fail on master, as expected): I'll try to raise an issue on eslint's issue tracker and try to prepare a PR as well, but realistically I probably won't get round to doing all of this until the weekend. That being said, I think that for CRA it still makes sense not to error on all unused arguments. If you change the eslint rule to function getStackFrames(
error: Error,
- unhandledRejection: boolean = false,
+ unhandledRejection: boolean,
contextSize: number = 3 |
Sorry, this was not clear at all. |
Is there any update on this, can this be closed? |
@Timer I'll close this one off as we're not sure if it's still relevant, but please let me know if it is. |
#4193
The text was updated successfully, but these errors were encountered: