Productivity is always key, we all know but as developers with tight deadlines and packed schedules, finding the right tools to boost productivity can make a world of difference. So, I’ve pulled together some of my favorite NPM packages.
Here are 10 NPM packages that will give your productivity a serious boost. And trust me, these aren't just the "usual suspects."
1. nodemon
If you haven't already, it's time to install this.nodemon
automatically restarts your Node.js application whenever file changes are detected, so you don’t have to keep restarting the server manually. It’s one of those "set it and forget it" tools that become indispensable once you start using it.
2. concurrently
If you need to run multiple npm scripts at the same time (like a backend and frontend dev server),concurrently
is a lifesaver. One terminal tab, multiple tasks.
3. eslint
A no-brainer for keeping your code linted and clean. It helps catch syntax errors and enforces coding standards. If you're working with a team, this can prevent style-related PR comments.
4. prettier
Prettier
helps format your code consistently. Pair this with ESLint for the ultimate clean code setup. Plus, you can add it as a pre-commit hook withhusky
to ensure every commit is formatted perfectly.
5. husky
Speaking of which,husky
allows you to run scripts before Git commits. You can automatically run linting, tests, or formatting before every commit, preventing those "oh no, I forgot to lint!" moments.
6. lint-staged
When paired withhusky
,lint-staged
allows you to only lint or format the files that are being committed, saving you time and processing power.
7. axios
Making HTTP requests is a common task for any developer, andaxios
remains one of the best libraries for this. It simplifies your requests and supports promises and async/await. Plus, its features for interceptors make API calls easier to manage.
8. jsonwebtoken (JWT)
Security is key, and JWT is still a go-to for handling token-based authentication in 2024. It's reliable, and its NPM package makes generating and verifying tokens a breeze.
9. dotenv
A small but incredibly useful package that allows you to separate environment configurations from your codebase. It’s great for managing sensitive keys or environment-specific settings.
10. moment-timezone
Yes,moment
is considered legacy now, butmoment-timezone
still plays a role when you need to handle time zones reliably. It extendsmoment
to parse and display dates in various time zones, which comes in handy for international apps.
Which ones do you already use, and what’s missing from this list? Let’s discuss it in the comments!
prettier is bad software, it autoremoves parenthesis in math contexts where readability and documenting programmer's intent are mission critical. The only way to prevent prettier from doing this is to uninstall. Very arrogant and poorly designed.
prettier.io/docs/en/ignore.html
Easier to just uninstall prettier and only use eslint than to write 5000 lines of
// prettier-ignore
github /prettier/prettier/issue...If you can’t properly configure tools like prettier doesn’t mean it is bad, dude. There is a new alternative to all tools like prettier, eslint, stylelint is biome. Check it out
not actually. you can manually change the settings just need to add teh configuration as you needed
There isn't a tool that fit every use case, prettier is good for common cases, if you have something very unusual it's different.
Instead of using moment, even the moment team calls out to use a library like luxon instead
Dayjs is way less in terms of size, same functionality
Instead of moment-timezon (rather than moment.js in generalsumitaec108.medium /stop-using-...) is better @dayjs/tz. Instead of prettier/eslint is biomebiomejs.dev/.Check it out
Would check it out!!
Hmm..... Its good. Also see my npm package:npmjs /package/xytro.js
Looks great!
Sir can you please help me to grow my package please sir
I use axios, cons: idk, pro: I like it.
Heard good things about it!
Good but why 10 only? the list should goes on.
I will go with Deno;);) one runtime include all.
There will be a Part 2 of this:)
Great list!
I created a lightweight scaffolding package so that I don't have to clone/copy-paste commonly used boilerplates all the time. It has 1.1k+ downloads now:
scaffold-master npm
You can use
process.loadEnvFile()
instead ofdotenv
.You may preferspacetimewhile working with datetime and timezone because its smart APIs.
Alternatives:
bun run --hot main.ts
pnpm run -r dev
Check out
wireit
package, also those tools likecommitizen
and@semantic-release
.Also
wait-on
helper.