2.0.0 • Published 2 years ago
eslint-plugin-moment-utc v2.0.0
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-devNext, install eslint-plugin-moment-utc:
npm install eslint-plugin-moment-utc --save-devNote: 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
}
}