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

bootstrap-datepicker contains a redefinition of undefined #2663

Open
redking00 opened this issue Aug 31, 2022 · 1 comment
Open

bootstrap-datepicker contains a redefinition of undefined #2663

redking00 opened this issue Aug 31, 2022 · 1 comment

Comments

@redking00
Copy link

Current release contains a redefinition of "undefined". This redefinition is detected by the "Special identifiers should not be bound or assigned" Sonar rule. According to the rule:

JavaScript has special identifiers that, while not reserved, still should not be used as identifiers. They include:

eval - evaluates a string as JavaScript code
arguments - used to access function arguments through indexed properties.
undefined - returned for values and properties that have not yet been assigned
NaN - Not a Number; returned when math functions fail.
Infinity - when a number exceeds the upper limit of the floating point numbers

These words should not be bound or assigned, because doing so would overwrite the original definitions of these identifiers. What’s more, assigning or binding some of these names will generate an error in JavaScript strict mode code.

May be this is not a real issue but would be great if the alert could be avoided.

Thanks.

@trysten
Copy link

trysten commented Feb 9, 2024

Can you give more details? Like where it's redefined etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants