Commit Graph

9 Commits (e068c318b46b8cec52b3190a7ac45b5dab888b6f)

Author SHA1 Message Date
fisker Cheung e068c318b4 refactor: rewrite FastPath class (#6225) 2019-06-15 15:11:45 -03:00
Ika 3de36e3a2b
fix(ng,vue): add parens to avoid unexpected `}}` in interpolations (#5657) 2018-12-30 23:03:42 +08:00
Lucas Azzola e03e4d6d40
Move needsParens to a language-specific file (#4201) 2018-03-25 18:35:32 +11:00
Jeff Lau 24f45d1b50 Require parenthesis around "TSAsExpression" inside an "UpdateExpression" (#4183) 2018-03-21 11:38:10 -03:00
Lucas Azzola 417c50aa84
Keep parens around Unary and Update Expressions (#3989) 2018-02-18 00:22:35 +11:00
Jed Fox 78a4f51662
Wrap ternaries in Flow typecasts in parens (#3940)
* Wrap TypeCastExpression in parens

* Tests
2018-02-14 11:19:39 +00:00
Christian Zosel fac08034e7 Split out location extraction into plugin config (#3777)
* Split out location extraction into plugin config

* Reduce set of exported function, rebase to current master

* Pass custom locStart/locEnd fn's directly to affected methods

* (wip) always use locStart/locEnd from plugin

* Convert graphql implementation

* Convert HTML implementation

* (wip) convert JS implementation

* Remove unused variables

* Continue conversion of JS implementation

* Replace "util.locStart" with direct call to "options.locStart"

* Remove util closure

* Add unit test for structure of shared util

* Fix linting error, simplify locStart/End implementations
2018-02-09 23:17:48 +11:00
Lucas Duailibe 01a59eeee3
Wrap conditionals and await in parens in spread property (#3681) 2018-01-09 01:45:51 -02:00
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