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

undesirable indent warnings #1583

Closed
Daniel-Hug opened this issue Mar 23, 2014 · 0 comments
Closed

undesirable indent warnings #1583

Daniel-Hug opened this issue Mar 23, 2014 · 0 comments

Comments

@Daniel-Hug
Copy link

With indent: 2 in config, the following code produces some undesirable indent warnings:

if (console && console.log) console.log({
  name: 'Daniel', // Expected 'name' to have an indentation at 5 instead at 3
  height: 5.8     // Expected 'height' to have an indentation at 5 instead at 3
});               // Expected '}' to have an indentation at 3 instead at 1

I prefer the above style over either of the following (which don't cause errors):

if (console && console.log) console.log({
    name: 'Daniel',
    height: 5.8
  });
if (console && console.log)
  console.log({
    name: 'Daniel',
    height: 5.8
  });
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
Option 'indent' still exists, though, for correct character reporting.

Closes jshint#1583
Closes jshint#999
Closes jshint#1085
Closes jshint#1467
Closes jshint#1404
Closes jshint#713
Closes jshint#428
Closes jshint#1369
Closes jshint#1254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant