
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
eslint-plugin-moment-timezone
Advanced tools
Enforce usage of moment-timezone instead of plain moment
Enforce usage of moment-timezone instead of plain moment.
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.
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
}
}
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.FAQs
Enforce usage of moment-timezone instead of plain moment
The npm package eslint-plugin-moment-timezone receives a total of 4,354 weekly downloads. As such, eslint-plugin-moment-timezone popularity was classified as popular.
We found that eslint-plugin-moment-timezone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.