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

What does "good-stuff" do? #658

Open
karelbilek opened this issue Mar 19, 2015 · 6 comments
Open

What does "good-stuff" do? #658

karelbilek opened this issue Mar 19, 2015 · 6 comments

Comments

@karelbilek
Copy link

There should be clearer documentation about "good-stuff" option.

What does it do? At least approximately.

@bitwiseman
Copy link
Member

You're right, it should be better documented.

It currently sets two behaviors that make jslint happy: case un-indenting and space_after_anon_function.

They are shown here:
https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js#L50

@Alhadis
Copy link

Alhadis commented May 28, 2015

I suggest nuking this option and using two separate parameters to control each behaviour. Trying to lump both under one seriously ambiguous option named --good-stuff (with an even less informative description) is counter-intuitive.

A setting named unindent-case is much more explicit.

@bitwiseman
Copy link
Member

Nuking the option is also a viable choice. That would be a breaking change, which would need to wait to the next version.

@adrianschmidt
Copy link

+1 on adding unindent-case

@bitwiseman bitwiseman added this to the v1.6.0 milestone Jul 20, 2015
@bitwiseman bitwiseman modified the milestones: 2.0.0, v1.6.0 Jan 27, 2016
@finalclass
Copy link

finalclass commented Dec 24, 2021

Apparently it does more then this.

// test.js file
const a = [
    "foo",
      "bar"
];
~$ js-beautify test.js 
const a = [
    "foo",
    "bar"
];
~$ js-beautify --good-stuff test.js 
const a = [
    "foo",
      "bar"
];~$

@bitwiseman
Copy link
Member

@finalclass
PRs welcome.

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

5 participants