71a5533c4e
* Sync README -> docs/options.md * Sync README -> docs/*.md * Misc fixups * Remove markdown-toc * Remove insert-pragma from ToC * Never again! * Move all docs to ./docs * Remove yarn toc * Fix inter-doc links * Fix links in footer * Clean up README.md * Add basic description to README.md * Use flat badges * Move editor guides to website * Improve prettier-ignore docs * Fixup bad find/replace * Add JSON to README * Fix custom parser API link * Fixup GitHub centering, add downloads badge * Add 1.8 docs * docs(website): mention markdown on homepage (#1) * Add intro * Add watching-files.md * Fix markdown syntax highlighting * Switch back to .md links |
||
---|---|---|
.github | ||
bin | ||
docs | ||
scripts | ||
src | ||
tests | ||
tests_config | ||
tests_integration | ||
website | ||
.codecov.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flowconfig | ||
.gitignore | ||
.ignore | ||
.pre-commit-hooks.yaml | ||
.prettierignore | ||
.travis.yml | ||
.yarnrc | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
commands.md | ||
index.js | ||
jest.config.js | ||
package.json | ||
yarn.lock |
README.md
Opinionated Code Formatter
JavaScript · Flow · TypeScript · CSS · SCSS · Less · GraphQL · JSON · Markdown
Intro
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
Input
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
Output
foo(
reallyLongArg(),
omgSoManyParameters(),
IShouldRefactorThis(),
isThereSeriouslyAnotherOne()
);
Prettier can be ran in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit comment on a code review ever again!
Badge
Show the world you're using Prettier →
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Contributing
See CONTRIBUTING.md.