eslint-plugin-date

0.0.0 • Public • Published

eslint-plugin-date

eslint plugin to handle safely date usage.

Contributing

Source Code Reference from https://github.com/Skyscanner/eslint-plugin-skyscanner-dates But there are specical changes for Business Scenarios.

Features

This eslint plugin is meant to be used to avoid explicit usage/manupulation of date in JS, so to avoid issues with timezones.

Installation

npm install --save-dev eslint-plugin-date

Usage

Add to the .eslintrc file inside the root folder of a linted project:

{
	"extends": "plugin:date/recommended",
	"plugins": ["date"]
}
{
	"extends": "plugin:date/error",
	"plugins": ["date"]
}
{
	"extends": "plugin:date/warn",
	"plugins": ["date"]
}
{
	"plugins": ["date"],
	"rules": {
		"date/no-date-fns": "off",
		"date/no-moment-dayjs": "off",
		"date/no-new-date-with-args": "error",
		"date/no-new-date-without-args": "off"
	}
}

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-date

Repository

Homepage

Weekly Downloads

1,139

Version

0.0.0

License

ISC

Unpacked Size

4.95 kB

Total Files

7

Last publish

Collaborators

  • heavensky