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

Indentation rules incorrectly flag properly indented code #5384

Closed
natecavanaugh opened this Issue Feb 24, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@natecavanaugh
Contributor

natecavanaugh commented Feb 24, 2016

Hi there,
This seems to be related to #5295
Using the following rule config:

indent: [2, "tab"]

The following lines will throw errors:

instance.layoutSerializer = new LayoutSerializer(
    {
        builder: instance.get('formBuilder')
    }
);

However, with the same config, the following will not throw any errors:

instance.layoutSerializer = LayoutSerializer(
    {
        builder: instance.get('formBuilder')
    }
);

The reason for this is because on this line, it's not checking for NewExpression which is what the first block of code will register as.

@eslintbot eslintbot added the triage label Feb 24, 2016

@ilyavolodin ilyavolodin added bug rule evaluating and removed triage labels Feb 24, 2016

@ilyavolodin

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Feb 24, 2016

Member

Sounds like an oversight to me. @gyandeeps @BYK ideas?

Member

ilyavolodin commented Feb 24, 2016

Sounds like an oversight to me. @gyandeeps @BYK ideas?

@gyandeeps gyandeeps added accepted and removed evaluating labels Feb 24, 2016

@gyandeeps

This comment has been minimized.

Show comment
Hide comment
@gyandeeps

gyandeeps Feb 24, 2016

Member

@natecavanaugh Do you want to send a PR for this quick fix?

Member

gyandeeps commented Feb 24, 2016

@natecavanaugh Do you want to send a PR for this quick fix?

@natecavanaugh

This comment has been minimized.

Show comment
Hide comment
@natecavanaugh

natecavanaugh Feb 24, 2016

Contributor

Sure thing :)

Contributor

natecavanaugh commented Feb 24, 2016

Sure thing :)

@natecavanaugh

This comment has been minimized.

Show comment
Hide comment
@natecavanaugh

natecavanaugh Feb 24, 2016

Contributor

Sent #5389

Contributor

natecavanaugh commented Feb 24, 2016

Sent #5389

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.