DEV Community

Cover image for 10 NPM Packages for Productivity
balrajOla
balrajOla

Posted on

10 NPM Packages for Productivity

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 with husky 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 with husky, 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, and axios 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, but moment-timezone still plays a role when you need to handle time zones reliably. It extends moment 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!

Top comments (21)

Collapse
 
carcinocron profile image
carcinocron

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.

Collapse
 
eshimischi profile image
eshimischi • Edited

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

Collapse
 
reduardo7 profile image
Eduardo Cuomo
// prettier-ignore
const m = (x *  y) + (a / b);
Enter fullscreen mode Exit fullscreen mode

prettier.io/docs/en/ignore.html

Collapse
 
carcinocron profile image
carcinocron

Easier to just uninstall prettier and only use eslint than to write 5000 lines of // prettier-ignore github.com/prettier/prettier/issue...

Collapse
 
asmyshlyaev177 profile image
Alex

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.

Collapse
 
___sinan_75179114011f9f1b profile image
__ Sinan

not actually. you can manually change the settings just need to add teh configuration as you needed

Collapse
 
xphile101361 profile image
Xphile

Instead of using moment, even the moment team calls out to use a library like luxon instead

Collapse
 
eshimischi profile image
eshimischi

Dayjs is way less in terms of size, same functionality

Collapse
 
eshimischi profile image
eshimischi • Edited

Instead of moment-timezon (rather than moment.js in general sumitaec108.medium.com/stop-using-...) is better @dayjs/tz. Instead of prettier/eslint is biome biomejs.dev/. Check it out

Collapse
 
balrajola profile image
balrajOla

Would check it out!!

Collapse
 
iscordian profile image
Koushik Roy

Hmm..... Its good. Also see my npm package: npmjs.com/package/xytro.js

Collapse
 
balrajola profile image
balrajOla

Looks great!

Collapse
 
iscordian profile image
Koushik Roy

Sir can you please help me to grow my package please sir

Collapse
 
martinbaun profile image
Martin Baun

I use axios, cons: idk, pro: I like it.

Collapse
 
balrajola profile image
balrajOla

Heard good things about it!

Collapse
 
maxifjaved profile image
Muhammad Asif Javed

Good but why 10 only? the list should goes on.

I will go with Deno ;) ;) one runtime include all.

Collapse
 
balrajola profile image
balrajOla

There will be a Part 2 of this :)

Collapse
 
abjcodes profile image
Abijith Vasanthakumar

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

Collapse
 
asmyshlyaev177 profile image
Alex • Edited

Check out wireit package, also those tools like commitizen and @semantic-release.
Also wait-on helper.

Collapse
 
ndaidong profile image
Dong Nguyen

You can use process.loadEnvFile() instead of dotenv.
You may prefer spacetime while working with datetime and timezone because its smart APIs.

Collapse
 
wxs77577 profile image
Johnny Wu

Alternatives:

  1. nodemon -> bun, just use bun run --hot main.ts
  2. concurrently -> pnpm workspace; pnpm run -r dev