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

No error when overriding globals #665

Closed
ralfstx opened this Issue Oct 1, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@ralfstx
Copy link

ralfstx commented Oct 1, 2012

Since r10, JSHint does not report a "Read only" error anymore for code that overrides a read-only global variable. Using /*globals */ in the source file still works.

Example configuration:

{"undef": true, "predef": {"foo": false}}

Example code:

foo = {};

JSHint <= r09 reports an error, r10 .. r12 does not.

@valueof valueof closed this in 5b4b1e5 Dec 5, 2012

jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

Fixed a regression with predef making all globals read/write.
When implementing blacklisted globals we introduced a bug where
globals assigned through predef would always be writeable. This
commit fixes that.

Closes jshintGH-665.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment