infctr / eslint-plugin-typescript-sort-keys

A linter plugin to require sorting interface and string enum keys
ISC License
143 stars 25 forks source link

Revamp plugin logic RE #26 #73

Open zachbryant opened 6 months ago

zachbryant commented 6 months ago

Firstly, thanks for taking the time to look at this. Apologies the PR is so large. When I realized my attempt at patching the swap behavior for #26 wasn't going to work, this seemed like the next best approach, but I felt it had to come with proper testing given the breadth of work required. I tried to reuse as much as I could, but the amount of edge cases required adding/replacing a lot of logic. Definitely open to feedback on this approach if anything is simpler/more sound, even if its nontrivial.

Changes included

Package maintenance

Misc changes

Known caveats & work left

I think this update should be released first as 4.0.0-alpha.1 in case anything goes terribly wrong.

zachbryant commented 2 months ago

It's been a minute since I drafted this and now some packages have major bumps which change Node support. I will leave them as they are so this upgrade supports anyone who hasn't bumped to higher ESLint versions yet

zachbryant commented 2 months ago

Self review notes: