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

Forbid functions named require in JS #50155

Closed
wants to merge 1 commit into from

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Aug 2, 2022

Fixes #48726

This is a maximal version that forbids it everywhere. I want to see how much of the user tests will break.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 2, 2022
@sandersn
Copy link
Member Author

sandersn commented Aug 2, 2022

@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 2, 2022

Heya @sandersn, I've started to run the diff-based user code test suite on this PR at 66f43c3. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@sandersn
Great news! no new errors were found between main..refs/pull/50155/merge

@sandersn
Copy link
Member Author

sandersn commented Aug 3, 2022

:suspect:

@jakebailey
Copy link
Member

Maybe this doesn't trigger because nobody's actually declaring a function named require in their own code, but consuming some other APIs / definitions which declare it for them, even if it's not the "real" one? e.g. webpack-dev, or my yarn plugin example?

@sandersn sandersn closed this Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
4 participants