
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
@miovision/eslint-plugin-disallow-date
Advanced tools
An ESLint plugin to disallow usage of JavaScript Date objects.
An ESLint plugin to disallow usage of JavaScript Date objects.
Install ESLint:
$ npm i -D eslint
Install @miovision/eslint-plugin-disallow-date
:
$ npm i -D @miovision/eslint-plugin-disallow-date
Note:
If you installed ESLint globally (using the -g
flag) then you must also
install @miovision/eslint-plugin-disallow-date
globally.
Add @miovision/disallow-date
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix, but must include
the @miovision
package scope:
{
"plugins": [
"@miovision/disallow-date"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@miovision/disallow-date/no-new-date": 2,
"@miovision/disallow-date/no-static-date": 2,
"@miovision/disallow-date/no-to-date": 2,
}
}
Run the linter with npx eslint --ext=js .
Rule ID | Description | |
---|---|---|
disallow-date/no-new-date | disallow new Date() usage | |
disallow-date/no-static-date | disallow Date.now() and other static functions | |
disallow-date/no-to-date | disallow moment().toDate() functions |
The content of this project under the MIT license.
FAQs
An ESLint plugin to disallow usage of JavaScript Date objects.
The npm package @miovision/eslint-plugin-disallow-date receives a total of 1,414 weekly downloads. As such, @miovision/eslint-plugin-disallow-date popularity was classified as popular.
We found that @miovision/eslint-plugin-disallow-date demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.