Can't seem to get to work, error Please make sure your selected text is a JS object!
I can't seem to get this plugin to work. At first, I thought it was because my js object was a rather complex one (lots of functions, comments, etc.). So I tried a very simple object and still no luck. Then I though it might be because I'm using it in a .ts file, not a .js file. But the simple example doesn't work in that either.
Running >Sort JS Object Keys with the following selected:
const test = {
two: "no",
one: "yes",
};
Results in:
Please make sure your selected text is a JS object!
Is anyone able to get this to plugin to work? Or get it to work with typescript?
This is probably not useful to OP since it's old, but hopefully other people who come across this issue will find this useful.
You have to select only the object. Do NOT select the name of the object or let or const. For the example above:
{
two: "no",
one: "yes",
};