prettier с фиксом для поддержки скобок с новой строки
 
 
 
 
 
 
Go to file
Ika a9eb68296c
fix(markdown): do not merge continuous cjk if proseWrap=preserve (#4504)
* test: add tests

* fix(markdown): do not merge continuous cjk if proseWrap=preserve

* fix: remove trailing comma for node4
2018-05-19 13:53:34 +08:00
.circleci Store artifacts in CircleCI (#4502) 2018-05-18 12:22:47 -03:00
.github 1.12.1 2018-04-16 20:45:29 -06:00
bin refactor(cli): separate files and make it pure as possible (#2730) 2017-09-03 19:21:06 +10:00
docs update doc with example for JSX Brackets config (#4455) 2018-05-10 15:07:52 +02:00
scripts feat: support JSON.stringify formatting (#4450) 2018-05-14 09:12:25 +08:00
src fix(markdown): do not merge continuous cjk if proseWrap=preserve (#4504) 2018-05-19 13:53:34 +08:00
tests fix(markdown): do not merge continuous cjk if proseWrap=preserve (#4504) 2018-05-19 13:53:34 +08:00
tests_config refactor(massageAst): move stripLocation to corresponding plugins (#4477) 2018-05-14 20:52:27 +08:00
tests_integration Fix wrong test (#4507) 2018-05-18 21:43:54 -03:00
website (refactor): Move common options out of JS plugin (#4445) 2018-05-15 14:14:50 -06:00
.codecov.yml Improve coverage and remove some dead code (#2504) 2017-07-17 23:31:42 +10:00
.eslintignore Add /coverage/ to .eslintignore (#4436) 2018-05-07 14:07:48 -03:00
.eslintrc.yml lint fixes 2018-04-17 18:09:36 -03:00
.flowconfig Build the dist/ with rollup (#1794) 2017-05-28 21:49:41 -07:00
.gitignore Include webpack to bundle the playground 2018-04-11 14:16:00 -03:00
.ignore Remove .npmignore and update .ignore (#2560) 2017-07-31 08:47:00 +10:00
.pre-commit-hooks.yaml Add support for markdown with pre-commit (#4021) 2018-02-21 12:10:25 -05:00
.prettierignore Implement getSupportInfo() and use it for inference (#3033) 2017-11-03 18:06:25 +11:00
.travis.yml Add --runInBand back to Travis 2018-05-18 15:00:05 -03:00
.yarnrc Add .yarnrc to use exact versions (#2016) 2017-06-06 18:04:52 -07:00
CHANGELOG.md Add missing links in CHANGELOG (#4330) 2018-04-17 12:25:25 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md (#4263) 2018-04-05 14:03:56 -06:00
LICENSE Happy new year 2018! (#3620) 2018-01-01 00:41:21 +01:00
README.md Badge maintenance (#4500) 2018-05-18 09:46:50 -04:00
commands.md fix(javascript): ternary with `--use-tabs` (#3745) 2018-01-26 10:02:42 +08:00
index.js Implement prettier.getFileInfo() method and --file-info CLI option (#4341) 2018-05-10 00:53:44 +08:00
jest.config.js Separate entry for web bundle (#4386) 2018-04-26 13:38:57 -03:00
package.json Refactor frontmatter handling (#4482) 2018-05-14 22:17:15 -03:00
web.js Separate entry for web bundle (#4386) 2018-04-26 13:38:57 -03:00
yarn.lock Refactor frontmatter handling (#4482) 2018-05-14 22:17:15 -03:00

README.md

Prettier Banner

Opinionated Code Formatter

JavaScript · Flow · TypeScript · CSS · SCSS · Less · JSX · Vue · GraphQL · JSON · Markdown · Your favorite language?

Chat on Gitter Travis CI Build Status CircleCI Build Status Codecov Coverage Status npm version monthly downloads from npm code style: prettier Follow Prettier on Twitter

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!


Documentation

Install · Options · CLI · API

Playground


Badge

Show the world you're using Prettiercode style: 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.