Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
eslint-plugin-skyscanner-dates
Advanced tools
eslint plugin to handle safely dates.
This eslint plugin is meant to be used to avoid explicit usage/manupulation of date in JS, so to avoid issues with timezones.
npm install --save-dev eslint-plugin-skyscanner-dates
new Date("some string")
.Add to the .eslintrc.json
file inside the root folder of a linted project:
The rules no-moment
and no-new-date-with-string-args
will raise an error and others will be just a warning. A few months later, we will change the rules to be error
severity, to force people to honour the rulers.
{
"extends": "plugin:skyscanner-dates/recommended",
"plugins": ["skyscanner-dates"]
}
Any rule failing will raise a blocking error.
{
"extends": "plugin:skyscanner-dates/error",
"plugins": ["skyscanner-dates"]
}
Any rule failing will just raise a warning.
{
"extends": "plugin:skyscanner-dates/warn",
"plugins": ["skyscanner-dates"]
}
Each rule can be configured on its own following eslint
conventions:
{
"plugins": ["skyscanner-dates"],
"rules": {
"skyscanner-dates/no-moment": "warn",
"skyscanner-dates/no-dayjs": "warn",
"skyscanner-dates/no-saddlebag-date": "warn",
"skyscanner-dates/no-date-fns-format": "warn",
"skyscanner-dates/no-saddlebag-localisation-tz": "warn"
"skyscanner-dates/no-new-date-with-args": "warn"
}
}
Your favourite code editor should provide information about API using code completion.
API docs can be generated by cloning the project and running:
npm install
npm run build-docs
API docs will now be generated in docs/api.md
.
npm install
- installs dependenciesnpm run lint
- runs linternpm run build-docs
- produces API documentation in Markdown format in docs/api.md
npm test
- runs linter and testsSee CONTRIBUTING.md if you want to contribute.
See How to release eslint-plugin-skyscanner-dates if you want to release a new version.
FAQs
eslint plugin to handle dates safely
The npm package eslint-plugin-skyscanner-dates receives a total of 13 weekly downloads. As such, eslint-plugin-skyscanner-dates popularity was classified as not popular.
We found that eslint-plugin-skyscanner-dates demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.