An ESLint plugin that enforces safe Date usage in JavaScript to prevent timezone-related bugs. It bans direct usage of `new Date()`, `moment`, `dayjs`, and `date-fns` in favor of safer alternatives. The current version is 0.0.0 and has not seen active development. It is forked from Skyscanner's eslint-plugin-skyscanner-dates with business-specific changes. The plugin provides three config presets: recommended, error, and warn.
npm install eslint-plugin-dateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures ESLint to use the date plugin with recommended settings and custom rule overrides.
Use import syntax or enable ESM in your project.
Use the plugin's recommended config or selectively disable rules for allowed libraries.
Manually replace forbidden Date patterns with approved date handling utilities.
Consider using a maintained alternative like eslint-plugin-date-rules or a custom rule.
npm install --save-dev eslint-plugin-date
Use `import date from 'eslint-plugin-date'` or adjust ESLint config to use string 'date'.
Check available rules: 'date/no-new-date-with-args', 'date/no-new-date-without-args', 'date/no-date-fns', 'date/no-moment-dayjs'.