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

new-cap rule crashes on odd but valid JS #1053

Closed
spocke opened this issue Jul 8, 2014 · 1 comment
Closed

new-cap rule crashes on odd but valid JS #1053

spocke opened this issue Jul 8, 2014 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@spocke
Copy link

spocke commented Jul 8, 2014

The "new-cap" crashes on this code:

(function() {
    var x = {
        1: function() {

        }
    };

    x[1]();
})();

At this line:
TypeError: Object 1 has no method 'charAt'
at getCap (..\eslint\lib\rules\new-cap.js:62:29)

@nzakas
Copy link
Member

nzakas commented Jul 8, 2014

Fixed by #1057

@nzakas nzakas closed this as completed Jul 8, 2014
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants