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

indent rule broken inside fat-arrow function #7732

Closed
NicholasBoll opened this issue Dec 9, 2016 · 1 comment
Closed

indent rule broken inside fat-arrow function #7732

NicholasBoll opened this issue Dec 9, 2016 · 1 comment
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days rule Relates to ESLint's core rules

Comments

@NicholasBoll
Copy link

Tell us about your environment

  • ESLint Version: 3.12.0
  • Node Version: 6.2.0
  • npm Version: 3.8.9

What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint

Please show your full configuration:

1

{
  "rules": {
    "indent" : [2, 2, {"ObjectExpression": 1}]
  }
}

2

{
  "rules": {
    "indent" : [2, 2, {"ObjectExpression": "first"}]
  }
}

What did you do? Please include the actual source code causing the issue.

const lamda = (filterName, display) => {
  return Object.assign({},
    filterName,
    {
      display,
    }
  );
};

What did you expect to happen?
No error

What actually happened? Please include the actual, raw output from ESLint.
1

    4:5   error    Expected indentation of 23 spaces but found 4   indent
    5:7   error    Expected indentation of 25 spaces but found 6   indent
    6:5   error    Expected indentation of 23 spaces but found 4   indent

2

    4:5   error    Expected indentation of 23 spaces but found 4   indent
    6:5   error    Expected indentation of 23 spaces but found 4   indent

The following code passes:
1

const lamda = (filterName, display) => {
  return Object.assign({},
    filterName,
                       {
                         display,
                       }
  );
};

2

const lamda = (filterName, display) => {
  return Object.assign({},
    filterName,
                       {
      display,
                       }
  );
};
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Dec 9, 2016
@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Dec 9, 2016
@not-an-aardvark
Copy link
Member

Thanks for the report. I was able to reproduce this issue.

@not-an-aardvark not-an-aardvark self-assigned this Dec 9, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 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 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

3 participants