TypeScript tip: Declaring type keys in alphabetical order makes them easier...


TypeScript tip: Declaring type keys in alphabetical order makes them easier to read later.

The good news is, you don’t have to manually alphabetize. This ESLint plugin automatically sorts keys on save. 😎

https://www.npmjs.com/package/eslint-plugin-typescript-sort-keys

#typescript

Oh, and here's a similar ESLint plugin for those working in plain JavaScript: https://github.com/eslint/eslint/blob/master/docs/rules/sort-keys.md

View original on X