Alon-Alexander / Alon-Alexander/functions-organizer

Undo history pollution

Ouverte
#18 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
1
Forks
1
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I can see that there have been no updates for quite some time, so I'm just testing the waters really.

Sorting all of the functions in a file seems to generate a whole lot of undo steps from each step in the sorting process. If you feel so inclined, you could use [Meriyah](https://github.com/meriyah/meriyah) to parse the JavaScript (ensuring that options to preserve whitespace and token/character positions is enabled). You could then sort the top-level AST tokens easily, then use the character positions stored against each of those tokens to slice up the original source code into strings that you then re-concatenate in the desired order, and finally write back to the editor as updated source code in a single undoable step.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.