Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda