Skip to content
CAI
Software that uses CAICheck a score

you-dont-need/You-Dont-Need-Momentjs

51.8

Adequate · 1 October 2026

120

lines of production code

JavaScript

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an ESLint plugin designed to detect and discourage the use of the Moment.js library in JavaScript codebases. It provides specific rules that flag various import styles, constructor calls, and method usage to encourage migration toward native Date methods or alternatives like date-fns. The tool includes a recommended configuration and comprehensive test coverage to ensure accurate detection of deprecated patterns.

Features

Initial release of eslint-plugin-you-dont-need-momentjs

The library now exports an ESLint plugin that provides rules to discourage the use of Moment.js, including checks for dynamic imports, standard imports, constructor usage, and require statements. A recommended configuration is included that enables all these rules at the error level, helping users identify and replace Moment.js dependencies in their codebases.

lib · high confidence

New ESLint rules to discourage moment.js usage

Added a suite of ESLint rules that flag the use of moment.js in favor of native Date methods or date-fns. The new rules include no-import-moment and no-require-moment to catch static imports and CommonJS requires, no-dynamic-import-moment to catch dynamic imports, no-moment-constructor to flag moment() calls, and no-moment-methods to flag specific moment API methods (such as add, format, diff, and isBefore) by referencing a new methods.json configuration file.

lib/rules · high confidence

Test coverage

Added unit and performance tests for date library comparisons; Added unit tests for ESLint rules preventing moment.js usage.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 51 → 52 (+0.8)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 68 → 68 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 59 → 59 (+0.0)
  • Readiness 36 → 37 (+1.3)
  • Security 75 → 80 (+5.0)

Resolved (3)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

New (2)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile is in a format this engine cannot resolve)
  • Medium CVE: [GHSA redacted] (package-lock.json)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

you-dont-need/You-Dont-Need-Momentjs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 43977cf990a4af509a758a4e9a6af40f4485d34d — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.