Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )

Home Page:http://unibeautify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript space before paren

natrius opened this issue · comments

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....

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