代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/Prettier 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
To get up and running, install the dependencies and run the tests:
yarn
yarn lint
yarn test
Here's what you need to know about the tests:
jest -u
(or yarn test -- -u
) to update the
snapshots. Then run git diff
to take a look at what changed. Always update
the snapshots when opening a PR.AST_COMPARE=1 jest
for a more robust test run. That formats each
file, re-parses it, and compares the new AST with the original one and makes
sure they are semantically equivalent.jsfmt.spec.js
that runs the tests. Normally you can
just put run_spec(__dirname);
there. You can also pass options and
additional parsers, like this:
run_spec(__dirname, { trailingComma: "es5" }, ["babylon"]);
tests/flow/
contains the Flow test suite, and is not supposed to be edited
by hand. To update it, clone the Flow repo next to the Prettier repo and run:
node scripts/sync-flow-tests.js ../flow/tests/
.docs
REPL locally. The easiest way to debug it in node, is to
create a local test file and run it in an editor like VS Code.Run yarn lint -- --fix
to automatically format files.
If you can, take look at commands.md and check out Wadler's paper to understand how Prettier works.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。