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 fails for structure in variable declaration #8829

Closed
webOS101 opened this issue Jun 28, 2017 · 5 comments
Closed

indent rule fails for structure in variable declaration #8829

webOS101 opened this issue Jun 28, 2017 · 5 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion question This issue asks a question about ESLint

Comments

@webOS101
Copy link
Contributor

webOS101 commented Jun 28, 2017

Tell us about your environment

  • ESLint Version: 4.1.1
  • Node Version: 6.8.0
  • npm Version: 4.6.1 (because @5 poops on everything)

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

Please show your full configuration:

{
	"rules": {
		"indent": [1, "tab"]
	}
}

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

var
	prop = {
		a: true
	},
	ri = 5;

What did you expect to happen?

No warnings

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

  3:1  warning  Expected indentation of 3 tabs but found 2  indent
  4:1  warning  Expected indentation of 2 tabs but found 1  indent

✖ 2 problems (0 errors, 2 warnings)
  0 errors, 2 warnings potentially fixable with the `--fix` option.

If you reverse the two variable declarations, no warnings are given.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jun 28, 2017
@platinumazure
Copy link
Member

Hi @webOS101, thanks for the issue!

I think this might be a duplicate of #8785 and might be resolved by #8801 (merged into master but not yet released). If I'm right, this should be fixed in our minor release scheduled for 7 July (ish).

Maybe you could check against our master branch and see if the issue is still present? And/or feel free to close if you agree that this might be a duplicate of #8785. Thanks!

@platinumazure platinumazure added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion question This issue asks a question about ESLint and removed triage An ESLint team member will look at this issue soon labels Jun 28, 2017
@webOS101
Copy link
Contributor Author

Thanks for the super-fast response! I did search issues and didn't see that one. Oops. I'll pull master and test to be sure. If it's fixed, I'll close this.

@webOS101
Copy link
Contributor Author

Looks to be fixed on my test case! I can't test on my actual app as my locally linked custom config file is not found by the linked version of eslint. Is that expected? How do you work around that for testing?

@platinumazure
Copy link
Member

@webOS101 Not sure I follow. Maybe you could stop by our chat room and see if anyone else can answer that question?

@webOS101
Copy link
Contributor Author

Sure, I can try that. To clarify (for posterity), I have globally installed all of my eslint plugins/configs. I npm linked eslint. In my package.json I specify my main config file. When I use the global eslint command (eslint .), it fails with a message indicating it cannot find eslint-config-myconfig.

@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
archived due to age This issue has been archived; please open a new issue for any further discussion evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion question This issue asks a question about ESLint
Projects
None yet
Development

No branches or pull requests

3 participants