2cfd8fb518
* WIP: Support TypeScript 3.7 * Add support for `asserts` keyword; Update snapshots * Update typescript-estree to v2.5.0 to remove the dependency on chokidar * Update TypeScript * Update CHANGELOG.unreleased.md * Add examples for TypeScript 3.7 * Update TypeScript 3.7 to latest dev version * Correct wording * Support `declare` keyword on class members (TypeScript 3.7 feature) * Update Changelog and downgrade TypeScript from 3.8.0-dev to 3.7.1-rc * Add a note regarding to dropping Node 6 support for direct installation * tweak build config to repair build * update CHANGELOG.unreleased.md * TSTypePredicate microrefactoring * fix formatting * clean up tests * fix parens for optional chaining inside computed properties * update CHANGELOG.unreleased.md * unify output across parsers for template literals * enable more tests with optional chaining * fix unneeded parens inside computed key of OptionalMemberExpression * fix paren issues for OptionalCallExpression * more fixes for OptionalCallExpression * @typescript-eslint/typescript-estree 2.5.1-alpha.4 * fix lint * revert build hacks * fix one more parens issue * @typescript-eslint/typescript-estree 2.5.1-alpha.5, remove loggerFn override * drop node 6 for direct installing from github * fix another parens issue, disable some tests for flow * workaround for flow bug * fix issues with comments Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com> |
||
---|---|---|
.azure-pipelines | ||
.github | ||
bin | ||
docs | ||
scripts | ||
src | ||
tests | ||
tests_config | ||
tests_integration | ||
website | ||
.codecov.yml | ||
.eslintignore | ||
.eslintrc.yml | ||
.flowconfig | ||
.gitattributes | ||
.gitignore | ||
.ignore | ||
.pre-commit-hooks.yaml | ||
.prettierignore | ||
.prettierrc | ||
.yarnrc | ||
CHANGELOG.md | ||
CHANGELOG.unreleased.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
azure-pipelines.yml | ||
commands.md | ||
cspell.json | ||
index.js | ||
jest.config.js | ||
package.json | ||
standalone.js | ||
yarn.lock |
README.md
Opinionated Code Formatter
JavaScript
· TypeScript
· Flow
· JSX
· JSON
CSS
· SCSS
· Less
HTML
· Vue
· Angular
GraphQL
· Markdown
· YAML
Your favorite language?
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 run 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-picky 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.