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: )
http://unibeautify.com/
MIT License
1.5k stars 453 forks source link

Javascript space before paren #2618

Open natrius opened 2 years ago

natrius commented 2 years ago

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:

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

SilentGlasses commented 1 year ago

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