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

Javascript space before paren #2618

Open
4 of 5 tasks
natrius opened this issue Apr 7, 2022 · 1 comment
Open
4 of 5 tasks

Javascript space before paren #2618

natrius opened this issue Apr 7, 2022 · 1 comment

Comments

@natrius
Copy link

natrius commented Apr 7, 2022

Description

The results of beautification are not what I expect. I'm using Atom Beautify together with https://github.com/ricardofbarros/linter-js-standard with the [JavaScript Semi-Standard Style (semistandard)](https://github.com/Flet/semistandard) style. I could not find any setting in these two to make it work as the linter expects a space in front of the parentheses.
Maybe an additional checkbox in the settings?

I'm using JS Beautify-Beautifier but i tried every other one as well, to be sure.

Input Before Beautification

This is what the code looked like before:

order  (starterIndex, mainIndex) 
  {
    return [
      this.starterMenu[starterIndex], this.mainMenu[mainIndex]
    ];
  },

Expected Output

The beautified code should have looked like this:

  order (starterIndex, mainIndex) {
    return [
      this.starterMenu[starterIndex], this.mainMenu[mainIndex]
    ];
  },

Actual Output

The beautified code actually looked like this:

  order(starterIndex, mainIndex) {
    return [
      this.starterMenu[starterIndex], this.mainMenu[mainIndex]
    ];
  },

Steps to Reproduce

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

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

I'm wondering if i'm missing something as nobody seems to have had this problem before....

@SilentGlasses
Copy link

If you still need this and are looking for something to fill the spot that Atom left, I am using Pulsar the successor to Atom... This package is working except for one deprecated error listed in #2605

If you don't need this anymore, can you please close this out so it's not just sitting there? Thanks

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

No branches or pull requests

2 participants