
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
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 7 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.