Ika
2dd311d554
fix(javascript): indentation for sub-ternaries ( #3747 )
...
* test: add test cases
* test: add test cases
* fix(javascript): indentation for sub-ternaries
* test: update test cases
* fix: no extra tab for `tabWidth: 4`
2018-01-16 11:32:25 +08:00
Thorben von Hacht
1a1de60491
Prettier extends and implements when not fitting in same line ( #3689 )
...
* Added prettier layout for class extends and implements
* Added prettier layout for class extends and implements, fix with keeping it in online if it fits
* Added prettier layout for class extends and implements, fixed tests as a side change
* Extends implements comments in same line fix
* Extends implements comments in same line without ugly workaround
* added empty line to test typescript_class/extends_implements.ts
* If only one extends keep old behaviour
* Removed console logs
2018-01-13 16:31:51 +11:00
Quinn Hoyer
aa0437cc60
Add support for skip() ( #3706 ) ( #3735 )
...
* Add support for skip() (#3706 )
* Fix regex & add tests
2018-01-13 13:02:31 +11:00
Lucas Duailibe
7f75499dd2
Prevent adding softline after arrow attribute with comments ( #3641 )
...
* failing test
* fix
2018-01-03 12:12:01 -08:00
Lucas Duailibe
7d3a30615b
Don't add () in JSX attributes with elements ( #3640 )
2018-01-03 11:36:25 -03:00
Lucas Duailibe
51744e1008
Print parens in FunctionTypeAnnotation when arrowParens is "always" ( #3616 )
...
* add test case
* print parens in function type annotation
2017-12-31 16:01:21 +01:00
Ika
6c0dd74518
feat(support-info): add `options` field ( #3433 )
...
* refactor: rename supportTable with supportLanguages
* refactor: use `dedent`
* test: reduce unnecessary data
* feat(support-info): add `options` field
* add `showDeprecated` option
* add `showUnreleased` option
* test: snapshot diff
* fix(support): add missing `since`
* fix: add missing `category`
* refactor: use template tag
* fix: `trailingComma:true` should redirect to `trailingComma:es5`
* refactor: reorder parser
* refactor: fix linting
* refactor: move options
* refactor: move options to printers
2017-12-31 15:34:37 +11:00
Lucas Azzola
a041914551
Extract cleanAST to language-specific files ( #3610 )
...
* Extract cleanAST to language-specific files
* Fix lint
* Fix clean-ast for vue and glimmer
2017-12-30 21:30:09 +11:00
Christopher Chedeau
7eca8011bc
Inline do expressions inside of JSX ( #3607 )
...
Fixes #3602
2017-12-29 18:58:01 -03:00
Lucas Azzola
ee148bfded
Split up comment printing ( #3575 )
...
* Split up comment printing
* Refactor plugin handling
* Allow multiparser to use options normalization
* Rename to canAttachComment
* Add inline comment
* Format code
* Use prettier.__debug to get AST
2017-12-27 00:04:09 +11: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