Conversation
|
This is great! Nice work @dwrth. My two initial thoughts are:
|
|
Not quite ready for the next review here but I got all the recommended configs working now without any rule tweaking! Still trying to figure out an issue I’m having with the "verbatimModuleSyntax" option |
|
@kmcginnes Apart from the merge conflicts (which I was not able to resolve due to the new import sorting rules) I managed to implement all requested changes now. I have adjusted the description of the PR accordingly! |
|
@dwrth Nice work! I'll be on vacation for the next week, so you won't hear much from me until I get back. When I get back I'll check out the rule changes and verify the auto fix changes look decent. Then we can discard all of your existing auto fixes, rebase the branch on the latest Sound like a plan? |
|
@kmcginnes Sounds great! Enjoy your time off! |
|
ok, I've had a chance to look things over and read up a bit on how all this works. I think I have enough information to formulate an opinion. Let's split the efforts in to two separate issues/PRs. The first PR would tackle the import type and Splitting them up makes sense to me because the Type ImportsThis should reduce down to just a few changes:
This sets the repo up to use type imports properly and any new code will produce an error if it doesn't use type imports when it should. Sort ImportsI'll create another GitHub issue for the sorting. I'll have to look a bit closer at |
4d04909 to
e3bbf76
Compare
|
I did not know that a force push would just auto-close this PR but maybe it's also for the better continuing this on a fresh branch with appropriate name :D |
|
@dwrth Interesting. I had not seen that behavior from GitHub before. I force push all the time. Oh well. I agree, it might be better to start fresh. |
Description
This PR introduces multiple new ESLint rules and changes to the typescript config. It also fixes/refactors effected parts in the codebase.
ESLint:
The reason for choosing import/order over the builtin sort-imports rule are the autofix capabilities which are better in this external package.
TSConfig:
Validation
Error highlighting for wrongly sorted imports:

With available autofix:

Error highlighting for incorrect type imports:

With available autofix:

Related Issues
Resolves #1118
Check List
license.
pnpm checksto ensure code compiles and meets standards.pnpm testto check if all tests are passing.Changelog.md.