Skip to content

Indent rule flagging multi-line variable declarations #3139

Description

@ericj79

Using [email protected] (on Windows 7 in case that matters) with the indent rule configured as: "indent": [2, 2, {"indentSwitchCase": true}]
I get errors when I declare multiple variables in a more than one line. For instance, the following works fine:

var geometry, box;

but this produces errors:

  var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth,
    height, rotate;
  507:17  error  Expected indentation of 4 characters  indent
  507:22  error  Expected indentation of 4 characters  indent
  507:29  error  Expected indentation of 4 characters  indent
  507:36  error  Expected indentation of 4 characters  indent
  507:44  error  Expected indentation of 4 characters  indent
  507:52  error  Expected indentation of 4 characters  indent
  507:60  error  Expected indentation of 4 characters  indent
  507:69  error  Expected indentation of 4 characters  indent

The variables on the second line do not generate any errors, which is expected, but the extra variables on the first line should not either. This behavior does not exist in 0.24.1

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyruleRelates to ESLint's core rules

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions