0.0.13 • Published 7 months ago

eslint-plugin-moment-timezone v0.0.13

Weekly downloads
2
License
ISC
Repository
github
Last release
7 months ago

eslint-plugin-moment-timezone

Enforce usage of moment-timezone instead of plain moment.

Installation

You'll first need to install ESLint:

$ 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:

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

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

{
    "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.
0.0.13

7 months ago

0.0.12

1 year ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago