Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
prettier-plugin-axml
Advanced tools
@ali/prettier-plugin-axml
是阿里小程序模板(AXML)的 Prettier 插件。
安装:
tnpm i --save-dev prettier @ali/prettier-plugin-axml
# 或者
yarn add --dev prettier @ali/prettier-plugin-axml
安装之后,即可通过命令行使用:
./node_modules/.bin/prettier --write "src/**/*.axml"
通常情况下,建议在 npm scripts 中增加一条:
{
// ...
"scripts": {
// ...
"format-axml": "prettier --write \"src/**/*.axml\""
}
}
然后执行 npm run format-axml
。
@ali/prettier-plugin-axml
支持以下配置项:
API Option | CLI Option | 默认值 | 描述 |
---|---|---|---|
printWidth | --print-width | 80 | 和 Prettier 一致(查看 Prettier 文档) |
tabWidth | --tab-width | 2 | 和 Prettier 一致(查看 Prettier 文档) |
axmlBracketSameLine | --axml-bracket-same-line | false | 模板标签属性较多导致多行展示时,> 是否和最后一条属性同一行展示,类似 jsxBracketSameLine |
axmlBracketSpacing | --axml-bracket-spacing | false | 模板的 {{}} 表达式是否增加空格,类似 JS 的 bracketSpacing |
以上配置项均可添加至项目的 prettier 配置文件 中。
ISC。
FAQs
Prettier plugin for AXML
The npm package prettier-plugin-axml receives a total of 11 weekly downloads. As such, prettier-plugin-axml popularity was classified as not popular.
We found that prettier-plugin-axml 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.