Workaround for prettier-plugin-organize-attribute not being applied in PhpStorm or WebStorm
Ah... When configuring prettier, PhpStorm and WebStorm have features built into the IDE by default, so changes made through prettier settings don't work very we
GGAMI·
Ah...
When configuring prettier,
PhpStorm and WebStorm have features built into the IDE by default,
so changes made through prettier settings don't work very well.
Previously, when I used Rearrange code as shown above, the externally injected $$restProps kept moving to the front.
That's why I tried installing the plugin and such, but it just wouldn't work.
After spending almost five days learning and configuring eslint and prettier, what I realized is that, while they're very convenient, they take an awfully long time to learn. The latest configuration methods also aren't widely shared.
And in particular, although they work well with vscode, there seem to be quite a few more hurdles and issues than expected when using IntelliJ.
Still, for code maintainability and cleanliness, it seems worthwhile to take the time to set up the basic eslint and prettier configurations.
The really funny thing is that when you run reformat code in IntelliJ, prettier runs along with it and formats the code, but eslint --fix doesn't.
How absurd...
So if you configure the attribute order in eslint and fix it with eslint --fix, running reformat code again changes the attribute order.
Of course, as shown in the images above, there's a Run eslint --fix on save option, but this option itself is much more inconvenient than you might expect.
I hope that someday eslint --fix can run alongside reformat code as well.