adrianlee44 / atom-aligner

Easily align multi-line with support for different operators and custom configurations
https://atom.io/packages/aligner
MIT License
78 stars 3 forks source link

aligning destructuring statements removes/mangles code #65

Closed dwelle closed 7 years ago

dwelle commented 7 years ago

atom 1.12.6, aligner 0.22.6

source (the | indicates cursor position):

const { c } = obj1;|
const { a, b } = obj2;

output:

const { c }    = obj1;
const { a, b }

Also, unrelated -- putting cursor on line 2 in the above case doesn't align at all upon trigger.

adrianlee44 commented 7 years ago

Thanks for reporting this.

Which es6 language package are you using? Is it https://atom.io/packages/language-babel?

dwelle commented 7 years ago

No, I'm not using any es6 language, just the default language-javascript AFAIK.. here are my community packages:

aligner@0.22.2
atom-handlebars@1.3.0
atom-overtype-mode@0.3.2
atom-wrap-in-tag@0.6.0
blame@0.10.0
block-travel@1.0.5
color-picker@2.2.3
default-language@0.3.0
docblockr@0.8.7
file-watcher@0.4.0
highlight-selected@0.11.2
linter@1.11.18
linter-eslint@8.0.0
minimap@4.25.6
minimap-git-diff@4.3.1
open-git-modified-files@0.2.4
resize-indent@0.3.0
sublime-block-comment@0.4.0

FYI, I think this package worked well with destructuring, a few versions back. No idea how many versions tho.