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

No space after anonymous async in js #1654

Closed
5 tasks done
TwoAbove opened this issue May 9, 2017 · 3 comments
Closed
5 tasks done

No space after anonymous async in js #1654

TwoAbove opened this issue May 9, 2017 · 3 comments

Comments

@TwoAbove
Copy link

TwoAbove commented May 9, 2017

Description

Hey! I hope you're having a good day.

The results of beautification are not what I expect.

Anonymous async function (async () => {}) should have a space after async.

Might I have missed something?

async function () {} works as intended

Input Before Beautification

This is what the code looked like before:

routes.get('/', async(req, res) => {
  res.status(200).json({ message: 'Connected!', apiVersion: 1 });
});

Expected Output

The beautified code should have looked like this:

routes.get('/', async (req, res) => {
  res.status(200).json({ message: 'Connected!', apiVersion: 1 });
});

Actual Output

The beautified code actually looked like this:

routes.get('/', async(req, res) => {
  res.status(200).json({ message: 'Connected!', apiVersion: 1 });
});

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: https://gist.github.com/TwoAbove/d262f8c3e347c5beeaff7a9613779775

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@prettydiff
Copy link
Collaborator

@TwoAbove
Copy link
Author

Hey! The linked issue is closed, can you update the project?

@stale
Copy link

stale bot commented Nov 28, 2017

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 28, 2017
@stale stale bot closed this as completed Dec 5, 2017
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

2 participants