# @xtrctio/eslint-plugin-disallow-date

> An ESLint plugin to disallow usage of JavaScript Date objects.

Latest version **1.0.1** (published 2019-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xtrctio/eslint-plugin-disallow-date
pnpm add @xtrctio/eslint-plugin-disallow-date
yarn add @xtrctio/eslint-plugin-disallow-date
bun add @xtrctio/eslint-plugin-disallow-date
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-03-11 |
| First published | 2019-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | ehacke |
| Keywords | eslint, eslintplugin, eslint-plugin, date, mit |

## Links

- npm: https://www.npmjs.com/package/@xtrctio/eslint-plugin-disallow-date
- Repository: https://github.com/xtrctio/eslint-plugin-disallow-date
- Homepage: https://github.com/xtrctio/eslint-plugin-disallow-date#readme
- Issues: https://github.com/xtrctio/eslint-plugin-disallow-date/issues
- npm.io page: https://npm.io/package/@xtrctio/eslint-plugin-disallow-date

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ^1.2.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-03-11

## README

# eslint-plugin-disallow-date

>   An ESLint plugin to disallow usage of JavaScript Date objects.

## Installation

1.  Install [ESLint](http://eslint.org):

    ```
    $ npm i -D eslint
    ```

2.  Install `@xtrctio/eslint-plugin-disallow-date`:

    ```
    $ npm i -D @xtrctio/eslint-plugin-disallow-date
    ```

**Note:**
If you installed ESLint globally (using the `-g` flag) then you must also
install `@xtrctio/eslint-plugin-disallow-date` globally.

## Usage

Add `@xtrctio/disallow-date` to the plugins section of your `.eslintrc`
configuration file. You can omit the `eslint-plugin-` prefix, but must include
the `@xtrctio` package scope:

```json
{
    "plugins": [
        "@xtrctio/disallow-date"
    ]
}
```

Then configure the rules you want to use under the rules section.

```json
{
    "rules": {
        "@miovision/disallow-date/no-new-date": 2,
        "@miovision/disallow-date/no-static-date": 2,
        "@miovision/disallow-date/no-to-date": 2,
    }
}
```

Run the linter with `npx eslint --ext=js .`

## Supported Rules

|   | Rule ID                      | Description                                      |
|---|------------------------------|--------------------------------------------------|
|   | disallow-date/no-new-date    | disallow `new Date()` usage                      |
|   | disallow-date/no-static-date | disallow `Date.now()` and other static functions |
|   | disallow-date/no-to-date     | disallow `moment().toDate()` functions           |

## License

The content of this project under the [MIT license](http://opensource.org/licenses/mit-license.php).

---
_Source: https://npm.io/package/@xtrctio/eslint-plugin-disallow-date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
