
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@cs-magic/prettier-config
Advanced tools
CS Magic 项目的共享 Prettier 配置。
npm install --save-dev @cs-magic/prettier-config
在 package.json 中:
{
"prettier": "@cs-magic/prettier-config"
}
或者在 .prettierrc 中:
module.exports = require('@cs-magic/prettier-config/src')
// .prettierrc
module.exports = require('@cs-magic/prettier-config/src/typescript')
// .prettierrc
module.exports = require('@cs-magic/prettier-config/src/tailwind')
如果你使用 @cs-magic/eslint-config,已经包含了 Prettier 配置。只需在 .eslintrc.js 中:
module.exports = {
extends: [
'@cs-magic/eslint-config/react', // 或其他配置
'@cs-magic/eslint-config/prettier',
],
}
如果你想单独集成:
npm install --save-dev eslint-config-prettier eslint-plugin-prettier
// .eslintrc.js
module.exports = {
extends: [
// 其他配置...
'plugin:prettier/recommended',
],
}
创建 .prettierrc 文件来覆盖默认配置:
module.exports = {
...require('@cs-magic/prettier-config/src'),
// 你的自定义配置
semi: true,
tabWidth: 4,
}
prettier --write "src/**/*.{js,jsx,ts,tsx}"
prettier --check "src/**/*.{js,jsx,ts,tsx}"
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
FAQs
Shared Prettier configurations for CS Magic projects
We found that @cs-magic/prettier-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.