DEV Community

Cover image for 10 NPM Packages for Productivity
Balraj Singh
Balraj Singh

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.nodemonautomatically 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),concurrentlyis 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
Prettierhelps format your code consistently. Pair this with ESLint for the ultimate clean code setup. Plus, you can add it as a pre-commit hook withhuskyto ensure every commit is formatted perfectly.

5. husky
Speaking of which,huskyallows 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-stagedallows 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, andaxiosremains 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,momentis considered legacy now, butmoment-timezonestill plays a role when you need to handle time zones reliably. It extendsmomentto 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
reduardo7 profile image
Eduardo Cuomo
// prettier-ignore
constm=(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-ignoregithub /prettier/prettier/issue...

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
___sinan_75179114011f9f1b profile image
__ Sinan

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

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
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 generalsumitaec108.medium /stop-using-...) is better @dayjs/tz. Instead of prettier/eslint is biomebiomejs.dev/.Check it out

Collapse
balrajola profile image
Balraj Singh

Would check it out!!

Collapse
iscordian profile image
Koushik Roy

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

Collapse
balrajola profile image
Balraj Singh

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
Balraj Singh

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
Balraj Singh

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
ndaidong profile image
Dong Nguyen

You can useprocess.loadEnvFile()instead ofdotenv.
You may preferspacetimewhile working with datetime and timezone because its smart APIs.

Collapse
wxs77577 profile image
Johnny Wu

Alternatives:

  1. nodemon -> bun, just usebun run --hot main.ts
  2. concurrently -> pnpm workspace;pnpm run -r dev
Collapse
asmyshlyaev177 profile image
Alex • Edited

Check outwireitpackage, also those tools likecommitizenand@semantic-release.
Alsowait-onhelper.