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

Incorrect indents? #32

Open
andr11b opened this issue Oct 25, 2016 · 4 comments
Open

Incorrect indents? #32

andr11b opened this issue Oct 25, 2016 · 4 comments
Assignees

Comments

@andr11b
Copy link

andr11b commented Oct 25, 2016

Hi!
It seems there is a problem with the indentation
1.

var a = 0,
b = 1;

should be

var a = 0,
    b = 1;
a += v1 + v2 +... +
v7 + v8

should be

a += v1 + v2 +... +
     v7 + v8
$Window.off('click')
 ? true
 : false;

should be

$Window.off('click')
    ? true
    : false;
$Pic.removeAttr('src')
.removeProp('title')
.hide();

should be

$Pic.removeAttr('src')
    .removeProp('title')
    .hide();
switch (foo) {
case 1:
    bar = 1;
    break;
default:
    bar = 2;
}

should be

switch (foo) {
    case 1:
        bar = 1;
        break;
    default:
        bar = 2;
}
@sunjw sunjw self-assigned this Oct 27, 2016
@sunjw
Copy link
Owner

sunjw commented Oct 27, 2016

I'll see what i can do to enhance format.

@andr11b andr11b closed this as completed Oct 27, 2016
@andr11b andr11b reopened this Oct 27, 2016
@andr11b
Copy link
Author

andr11b commented Oct 27, 2016

I forgot about another case:

return (typeof value === "number")
 ? Math.floor(value)
 : (typeof value === "string")
 ? value.charCodeAt(0)
 : default_value;

should be

return (typeof value === "number")
    ? Math.floor(value)
    : (typeof value === "string")
        ? value.charCodeAt(0)
        : default_value;

Thanks!

@NudeSpoons
Copy link

@underr-ua
The title of your issue should be "Incorrect indents?".
Perhaps you should correct it.

@andr11b andr11b changed the title Incorrect intends? Incorrect indents? Feb 24, 2019
@DBa2016
Copy link

DBa2016 commented Sep 7, 2022

@sunjw - just downloaded the tool, works great but I can second the indentation issues. "Dependent" code (like continued lines) needs to be indented, this is quite important for readability.

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

No branches or pull requests

4 participants