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

bracketSpacing: <bool> - no work #5102

Closed
oleg-darkdev opened this issue Sep 16, 2018 · 2 comments
Closed

bracketSpacing: <bool> - no work #5102

oleg-darkdev opened this issue Sep 16, 2018 · 2 comments
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:duplicate Issues that are a duplicate of a previous issue

Comments

@oleg-darkdev
Copy link

Prettier 1.14.2
Playground link

--parser babylon
--single-quote

Input:

function sum( a, b ) {
  return a + b;
}

Output:

function sum(a, b) {
  return a + b;
}

my .prettierrc

{
"bracketSpacing": true,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "es5"
}

Expected behavior:

@duailibe
Copy link
Member

Hi! See this section from our docs:

https://prettier.io/docs/en/options.html#bracket-spacing

Print spaces between brackets in object literals.

Valid options:

  • true - Example: { foo: bar }.
  • false - Example: {foo: bar}.

The lack of spaces in function arguments is expected and can't be configured. See #1303 for previous discussion.

@ikatyang ikatyang added type:duplicate Issues that are a duplicate of a previous issue lang:javascript Issues affecting JS labels Sep 17, 2018
@oleg-darkdev
Copy link
Author

Thanks

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Dec 17, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:duplicate Issues that are a duplicate of a previous issue
Projects
None yet
Development

No branches or pull requests

3 participants