Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
JS Static Checks to verify library isn't used

My application used moment in lots of places to apply a range of date-time formats.

To achieve consistency, I've switch to wrapping moment formatting inside new formatDate() and formatTime() convenience methods. Now dates and times will always be formatted in consistent methods. I've also been able to include some timezone-sensitive handling in the helpers.

But, in the future it will be all-too-easy to start letting instances of moment.format() into the code again, and allow a range of date-time formats.

Is there a static analysis tool (hopefully CI compliant) that checks that particular classes/methods are NOT used in code?

Obvs there would be an exclusion comment in the two instances where I legitimately used moment.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!