# eslint-plugin-moment-timezone

> Enforce usage of moment-timezone instead of plain moment

Latest version **0.0.13** (published 2023-10-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-moment-timezone
pnpm add eslint-plugin-moment-timezone
yarn add eslint-plugin-moment-timezone
bun add eslint-plugin-moment-timezone
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2023-10-11 |
| First published | 2020-02-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Matt Holland |
| Maintainers | hollandmatt |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-moment-timezone
- Repository: https://github.com/hollandmatt/eslint-plugin-moment-timezone
- Homepage: https://github.com/hollandmatt/eslint-plugin-moment-timezone#readme
- Issues: https://github.com/hollandmatt/eslint-plugin-moment-timezone/issues
- npm.io page: https://npm.io/package/eslint-plugin-moment-timezone

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.1.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.0.13 (latest) — 2023-10-11
- 0.0.12 — 2023-05-08
- 0.0.11 — 2021-03-16
- 0.0.10 — 2021-03-16
- 0.0.9 — 2021-03-16
- 0.0.8 — 2020-04-06
- 0.0.6 — 2020-02-27
- 0.0.5 — 2020-02-26
- 0.0.4 — 2020-02-26
- 0.0.2 — 2020-02-26

## README

# eslint-plugin-moment-timezone

Enforce usage of moment-timezone instead of plain moment.

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-moment-timezone`:

```
$ npm install eslint-plugin-moment-timezone --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-moment-timezone` globally.

## Usage

Add `moment-timezone` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "moment-timezone"
    ]
}
```

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

```json
{
    "rules": {
        "moment-timezone/use-moment-timezone": 2
    }
}
```

## Supported Rules

* `use-moment-timezone`: Ensure that `moment-timezone` is imported instead of plain `moment`.
* `moment-no-utc`: Prevent use of `moment.utc()` for timezone-aware code.

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