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

Fix: ignored nodes in indent rule (fixes #9392) #9393

Merged
merged 1 commit into from Oct 11, 2017

Commits on Oct 7, 2017

  1. Fix: ignored nodes in indent rule (fixes eslint#9392)

    When a node is ignored by the indent rule, it ought not to matter
    how it’s indented. But the ignoring of nodes was implemented in
    such a way that the *type* of indentation (tabs vs spaces) was
    being checked. For example in "tab" mode, an ignored line indented
    by four spaces would cause the error “Expected indentation of 4 tabs
    but found 4 spaces”.
    
    In particular, this is a problem with “tabs for indentation, spaces
    for alignment” styles, where we want to allow code like:
    
    var x = 1,
        y = 2;
    
    where the second line is aligned using four spaces.
    
    The implementation is taken from @not-an-aardvark’s comment
    eslint#9393 (review)
    
    All tests pass.
    
    Fixes eslint#9392.
    robinhouston committed Oct 7, 2017
    Configuration menu
    Copy the full SHA
    bf7a3ed View commit details
    Browse the repository at this point in the history