prettier с фиксом для поддержки скобок с новой строки
 
 
 
 
 
 
Go to file
Lucas Azzola 4c9d4061da
Prettier Plugin API (#3536)
* Move files around in preparation for refactor

* Update paths in build script

* Extract generic printing logic from the JavaScript printer

* Conform printer API

* Fixup decorator handling

* Fix multiparser

* Create plugin entry for markdown

* Create plugin entry for javascript/typescript

* Create plugin entry for html

* Create plugin entry for graphql

* Create plugin entry for css/less/scss

* Move JSON to JS plugin entry

* Integrate plugins into getSupportInfo()

* Move astFormat to parser definition

* Move util to common

* Implement parser loading

* remark -> mdast

* Rename cli/cli -> cli/index

* Rename builder -> doc package, fix printer resolution

* Fix doc shape assumption in CSS-in-JS logic

* Fix third-party.js prod resolution

* Fixup build-docs script

* Distribute multiparser code

* Remove requirement to forward options

* Flatten closure

* Remove debug directory

* Expose doc

* Add external plugins

* Pass options to loadPlugins

* Export getParsers

* Pin resolve version

* Use getSupportInfo in Markdown embed

* Document plugin API

* Update build-docs

* Add CLI for plugins

* Lint docs

* Fixup build.js

* Add vue language

* Fixup multiparser for vue

* Upgrade rollup and rollup-plugin-commonjs

* Fixup third-party build

* Change AST format in docs
2017-12-26 12:23:50 +11:00
.github 1.9.2 2017-12-12 01:15:12 -02:00
bin refactor(cli): separate files and make it pure as possible (#2730) 2017-09-03 19:21:06 +10:00
docs Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
scripts Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
src Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
tests Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
tests_config Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
tests_integration Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
website Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
.codecov.yml Improve coverage and remove some dead code (#2504) 2017-07-17 23:31:42 +10:00
.eslintignore chore(eslint): ignore `/tests_integration/cli/` 2017-09-03 21:50:19 +08:00
.eslintrc.yml Add `root: true` to .eslintrc.yml (#3519) 2017-12-18 23:46:28 +11:00
.flowconfig Build the dist/ with rollup (#1794) 2017-05-28 21:49:41 -07:00
.gitignore Docs build script (#3332) 2017-11-28 09:27:25 +11:00
.ignore Remove .npmignore and update .ignore (#2560) 2017-07-31 08:47:00 +10:00
.pre-commit-hooks.yaml Use `files:` over `types:` in pre-commit configuration (#2759) 2017-09-05 12:17:02 -07:00
.prettierignore Implement getSupportInfo() and use it for inference (#3033) 2017-11-03 18:06:25 +11:00
.travis.yml Revert "Set travis dist to "precise"" (#3510) 2017-12-18 00:06:49 +11:00
.yarnrc Add .yarnrc to use exact versions (#2016) 2017-06-06 18:04:52 -07:00
CHANGELOG.md 1.9.2 2017-12-12 01:15:12 -02:00
CONTRIBUTING.md Prettify style in playground and code block languages (#3419) 2017-12-05 19:48:11 -07:00
LICENSE Add MIT license 2017-01-10 09:06:32 -05:00
README.md [vue] Introduce proper support for Vue Single File Components (SFC) (#3563) 2017-12-25 01:15:33 +01:00
commands.md Update the command documentation and add types (#3494) 2017-12-19 10:17:35 +11:00
index.js Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
jest.config.js Make production tests always run against dist/ (attempt 2) (#2942) 2017-10-02 17:58:55 +02:00
package.json Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00
yarn.lock Prettier Plugin API (#3536) 2017-12-26 12:23:50 +11:00

README.md

Prettier Banner

Opinionated Code Formatter

JavaScript · Flow · TypeScript · CSS · SCSS · Less · Vue · GraphQL · JSON · Markdown

Gitter Travis Codecov npm version monthly downloads 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.