Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix lint issue from 501993eb #14495

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

akx
Copy link
Collaborator

@akx akx commented Jan 1, 2024

Description

ESlint doesn't like polluting global namespaces like that.

Also, unless you really do need to rebind this, foo(...args) is the more modern idiom for foo.apply(null, args).

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 merged commit ac3cc1a into AUTOMATIC1111:dev Jan 1, 2024
3 checks passed
@AUTOMATIC1111
Copy link
Owner

my bad; I keep making this mistake over and over with js; python...

@akx
Copy link
Collaborator Author

akx commented Jan 1, 2024

Heh, well, Lua was even worse – everything is global and you can also write to global names unless you declare them local.

Compounded by the fact that the global function to get a type from a variable is type, so you're one type = nil away from global disaster...

@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants