Moment.js code style rules. See the documentation in the docs/ folder for more information on the specific rules.
Note: This project has no affiliation with the ESLint team or the Moment.js team.
Install ESLint if you haven't already. ESLint installation instructions can be found here.
Install eslint-plugin-momentjs.
npm i eslint-plugin-momentjs --save-dev
Add the plugin to your .eslintrc
configuration.
...
"plugins": [
"momentjs"
],
...
Configure the rules. More information
"rules": {
"momentjs/some-rule": "warn",
"momentjs/some-other-rule": "error",
...
}