federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
94 stars 23 forks source link

Sort lists inside json if sort option is enabled #85

Closed utkarshgupta137 closed 4 years ago

utkarshgupta137 commented 4 years ago

@lexicalunit

lexicalunit commented 4 years ago

Unfortunately changing the order of arrays can affect program behavior. For example, prettier doesn't do this: https://github.com/prettier/prettier/issues/3569

utkarshgupta137 commented 4 years ago

Would it be reasonable to allow it as a setting?

lexicalunit commented 4 years ago

Maybe! It would have to have a warning about how it could cause issues. Also there would need to be some added unit tests with the change.