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.
@mediacurrent/prettier-config
Advanced tools
Make sure all of your code is run through Prettier when you commit it to git. We achieve this by configuring prettier to run on git hooks using husky and lint-staged.
Make sure all of your code is run through Prettier when you commit it to git. We achieve this by configuring prettier to run on git hooks using husky and lint-staged.
npm install --save-dev prettier @mediacurrent/prettier-config
Can be extended two ways:
Add the following to you package.json
"prettier": "@mediacurrent/prettier-config"
This method does not allow overrides. If overrides are needed, use the next method.
module.exports = {
...require("@mediacurrent/prettier-config"),
// Override here
semi: false,
};
Unfortunately, Prettier does not have a way to extend a shared .prettierignore
file so the one in this repo must be copied and pasted in to a new .prettierignore
file at the root of your project.
To have prettier format all files before commit (to prevent unformatted files from being committed), follow these steps.
npm install --save-dev husky lint-staged
package.json
This will affect .js
, .md
, .mdx
, .json
, and .scss
files. For this to work properly, eslint and sass-lint need to have been configured properly.
Add the following husky
and lint-staged
commands to your package.json
.
{
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,md,mdx,json}": "['prettier --write']",
"*.scss": "npm run lint:sass",
}
}
FAQs
Make sure all of your code is run through Prettier when you commit it to git. We achieve this by configuring prettier to run on git hooks using husky and lint-staged.
We found that @mediacurrent/prettier-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.