1.0.0 • Published 8 years ago

eslint-plugin-moment-utc v1.0.0

Weekly downloads
584
License
ISC
Repository
github
Last release
8 years ago

eslint-plugin-moment-utc

This is an ESLint plugin to prevent the usage of localtime.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-moment-utc:

npm install eslint-plugin-moment-utc --save-dev

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

Usage

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

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

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

{
    "rules": {
        "moment-utc/no-moment-without-utc": 2
    }
}

Supported Rules