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

Calling a function with many parameters #8801

Open
oldrich-s opened this issue Jul 20, 2020 · 0 comments
Open

Calling a function with many parameters #8801

oldrich-s opened this issue Jul 20, 2020 · 0 comments
Labels
area:assignments area:function calls lang:javascript Issues affecting JS status:needs discussion Issues needing discussion and a decision to be made before action can be taken

Comments

@oldrich-s
Copy link

oldrich-s commented Jul 20, 2020

Prettier 2.0.5
Playground link

--parser babel

Input:

const logsDirPath = Path.join(process.cwd(), '..', bundleDirPath, 'logs', fileName)

Output:

const logsDirPath = Path.join(
  process.cwd(),
  "..",
  bundleDirPath,
  "logs",
  fileName
);

Expected behavior:

const logsDirPath =
    Path.join(process.cwd(), '..', bundleDirPath, 'logs', fileName);

For now I have to do:

const logsDirPath = Path.join(...[process.cwd(), '..', bundleDirPath, 'logs', fileName])

to force a similar behaviour:

const logsDirPath = Path.join(
  ...[process.cwd(), "..", bundleDirPath, "logs", fileName]
);
@thorn0 thorn0 added lang:javascript Issues affecting JS status:needs discussion Issues needing discussion and a decision to be made before action can be taken labels Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:assignments area:function calls lang:javascript Issues affecting JS status:needs discussion Issues needing discussion and a decision to be made before action can be taken
Projects
None yet
Development

No branches or pull requests

2 participants