Lucas Duailibe
6a953e47b5
Print description of enum and input for GraphQL ( #3633 )
2018-01-03 01:29:11 -03:00
Christopher Chedeau
5356db0e69
Normalize GraphQL multi-line strings ( #3632 )
...
* Normalize GraphQL multi-line strings
See discussion in https://github.com/prettier/prettier/pull/3605#discussion_r159120321
* split
2018-01-02 11:55:53 -08:00
Lucas Duailibe
2cb9498ab6
Output files as-is if ignored ( #3618 )
...
* fix --stdin-filepath
* output file as-is without --write
* return early
* use writeOutput
2017-12-31 18:08:09 +01:00
Christopher Chedeau
58e5536741
Update GraphQL parser ( #3605 )
...
* Update GraphQL parser
Fixes #3601
This adds support for
- description as strings
- extending all the possible types
- block strings
- allow removing {} if there's no implementation for all graphql types
This is a breaking change but shouldn't be a big issue.
- Empty types are no longer allowed (there's an option to enable it but it hasn't been released yet). The fix is to remove `{}`
Something that hasn't been changed because not released:
- Doesn't support the new `&` separator for implementing multiple interfaces
A bug has been fixed:
- Now properly prints @directives for unions.
* Properly handle triple quotes
2017-12-31 16:45:06 +01: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
Ika
6872ed8310
fix(markdown): replace newlines with hardlines in multiparser ( #3611 )
...
* test: add failing test
* fix(markdown): replace newlines with hardlines in multiparser
2017-12-30 10:33:58 -05: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
Jimmy Jia
cfb8987ecd
Revert Relay Classic non-support ( #3606 )
...
This reverts commit e8551b994d313ea023855a790c87acc4833150f9.
2017-12-29 21:14:08 +01:00
Robert Webb
833666a394
Support handlebars ( #3534 )
...
* feat(glimmer): initial HTML/Handlebars/Glimmer support
* feat(glimmer): support un-escaped mustache expressions
* fix(glimmer): add 'as |foo|' syntax
* fix(glimmer): support {{foo bar}} syntax
* feat(glimmer): implement all AST types
* feat(glimmer): implement if/else if/else
* test(glimmer): ignore leading/trailing whitespace from AST_COMPARE
* fix(glimmer): do not use trailing slash for void self-closing elements
* chore(build): disable html tests until we can sort out the glimmer dependency
* feat(html): complete rebase on parse5 addition
* Prettier Support For Glimmer VM/Handlebars
Polished Support for Sub Expressions
Added test cases for glimmer primitives
Added support for concat statements
Attempted to make element nodes work
Attempted block statements
Element Nodes are OK
Added support for block elements that are not else-if related
Added support for Else/If
Cleaning up
Rebase
Switch node 4 syntax
Update build
* Removed dead code/partials
* Added new lines to end of test files.
* Rebase after plugin change
* Added ignores to code coverage
2017-12-29 18:14:31 +01:00
Jimmy Jia
bbfc450cd2
Support Relay Classic ( #3595 )
2017-12-28 14:20:25 -03:00
Jimmy Jia
b63c669ed9
Support plugins field in config ( #3584 )
...
* Actually support plugins field in config
* Resolve plugin parsers
* Fix default from CLI for "plugins"
2017-12-28 20:08:58 +11: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
Joseph Frazier
7b211eab24
editorconfig: Only search for .editorconfig up to the VCS directory ( #3559 )
...
* editorconfig: Only search for .editorconfig up to $PWD
This addresses https://github.com/prettier/prettier/issues/3558
I'm not sure if this is the best way to find the "project root", but it
seems better than before.
* editorconfig: Search for `.editorconfig` up to the VCS directory
This uses [find-project-root] to find the nearest directory containing `.git` or `.hg`
See here for context: https://github.com/prettier/prettier/pull/3559#issuecomment-353756948
[find-project-root]: https://github.com/kirstein/find-project-root
* editorconfig: Add test for finding VCS directory
It's a little hacky in that the .hg file isn't really a Mercurial
repository, but it's enough to illustrate the intent. See here for
context: https://github.com/prettier/prettier/pull/3559#issuecomment-353857109
2017-12-26 18:16: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
Lucas Azzola
9a1f3211c9
Add content{Start,End} to massageAST ( #3566 )
2017-12-25 20:39:34 +11:00
Christopher Chedeau
c40b061b80
[vue] Introduce proper support for Vue Single File Components (SFC) ( #3563 )
...
There's a lot of demand for vue sfc (#2097 ). This introduces partial support for them: all the html is printed as is, except for the script and style tags which are printed using prettier. I believe that this should cover a lot of the use cases while being simple to support and if we want we can extend to more in the future.
I copy pasted the html parser used by vue (it's just a single 400 lines file) so that we don't run the chancesof conflicts. I'm also very conservative: I only print the style and script at the top level and for the lang attributes we support.
I expect this to be landable as is and provide value, review welcome :)
2017-12-25 01:15:33 +01:00
Jed Fox
5ccc213a21
Conform the quotes in Markdown link titles to the singleQuote option ( #3481 )
...
* Add an option to utils.printString to use the passed string as-is
* Conform the quotes in Markdown link titles to the singleQuote option
* Don’t use destructuring
* Add some tests
* Format util.js
* Use custom string-printing logic
* Add some more tests
* Fix tests
* Address review comments
* Revert "Format util.js"
This reverts commit d2533ef7fb9231e2f733ece7decac9b923cf6941.
* Revert "Don’t use destructuring"
This reverts commit a5d3b0ac76a076e9a89cffc8cec396cabeacd1ee.
* Revert "Add an option to utils.printString to use the passed string as-is"
This reverts commit ef8e8322609ca3c2808885f3fadcd03f0790078c.
* Even more tests
2017-12-24 15:44:38 +01:00
Simen Bekkhus
36727421c2
chore: use scoped babel package ( #3529 )
2017-12-20 19:36:33 +11:00
Joseph Frazier
f82b574fd4
Return early from `massageAST()` ( #3522 )
...
This reduces nesting and handles the edge cases first.
This commit is best viewed ignoring whitespace differences:
git show -w
2017-12-18 12:33:53 -05:00
Anatolie Rotaru
d4101169e5
Fix PostCSS VS Code integration ( #3454 )
2017-12-19 00:05:39 +11:00
Lucas Azzola
ed80d6c5bd
Make all CLI logging go through a logger ( #3515 )
...
* Make all CLI logging go through a logger
* Add --loglevel docs
* Change default loglevel to log
* Update snapshots
* Switch to YAML eslint files
2017-12-18 23:22:07 +11:00
Georgii Dolzhykov
5c6b93a654
Add "JSON with comments" to vscodeLanguageIds ( #3496 )
2017-12-16 11:45:51 +11:00
Lucas Duailibe
4d23e9081d
Print flow type annotation comments as comments ( #3449 )
2017-12-15 05:11:48 -02:00
James Henry
5feb76f13f
Update tsep to v11 and update snapshot ( #3471 )
...
* Update tsep to v11 and update snapshot
* Remove unneeded TSNamespaceFunctionDeclaration
2017-12-14 17:44:59 +11:00
Lucas Duailibe
694f9c8588
Print comment after arrow function params ( #3444 )
2017-12-12 01:26:41 -02:00
James Henry
dc91108453
Update tsep and apply breaking changes ( #3455 )
2017-12-12 01:20:54 -02:00
Lucas Duailibe
d00d09bb87
Don't break single argument destructuring arguments ( #3443 )
2017-12-10 12:29:09 -02:00
Brian Ng
38c8286907
Fix closing parens on multi-line intersection/union type ( #3436 )
2017-12-10 22:32:17 +11:00
Lucas Duailibe
3fa2229a62
Fix printing union types inside a function param type ( #3446 )
...
* Fix printing union types inside a function param type
* fix alignment
2017-12-10 20:22:13 +11:00
Lucas Duailibe
dbf22eb41a
Fix printing separator in objects with prettier-ignore ( #3448 )
2017-12-10 02:57:42 -02:00
Lucas Duailibe
69f05e42c9
Consider TSNonNullExpression part of member chain ( #3442 )
2017-12-10 02:41:53 -02:00
Lucas Duailibe
934e4d3027
Fix babylon misplacing comments ( #3441 )
...
* Fix comments in class method args
* Fix comments in obj property
2017-12-09 15:43:19 -02:00
Lucas Duailibe
69f6ee7829
Only prevent lone `get` and `set` if property has no value ( #3434 )
2017-12-07 11:03:55 -02:00
Lucas Duailibe
7cff189dd8
Print trailing comma when last arg is arrow ( #3428 )
2017-12-07 02:48:11 -02:00
Lucas Duailibe
639c523885
Skip folders in CLI pattern
2017-12-05 16:07:27 -02:00
Lucas Azzola
829616dd6c
Fix multiparser trailing comma regression ( #3405 )
...
* Fix multiparser trailing comma regression
* Refactor trailing comma application
2017-12-05 19:01:00 +01:00
Ika
e09359d242
fix(doc-printer): no wrong function call ( #3401 )
2017-12-05 20:09:36 +08:00
Lucas Duailibe
66c9315d13
Don't default print comments for JSXFragments ( #3398 )
2017-12-05 08:41:45 -02:00
Ika
f3e7ca2210
chore(playground): add new options ( #3350 )
2017-12-05 21:22:10 +11:00
Lucas Azzola
c7c1d2e7a4
Upgrade Prettier to Prettier 1.9 ( #3395 )
...
* Upgrade to prettier@1.9.0
* Run eslint --fix
* Run prettylint --fix
* Fix playground with editorconfig script
2017-12-05 08:14:03 -02:00
Joseph Frazier
cecf0657a5
Re-add EditorConfig support (undo #3213 ) ( #3255 )
...
* Revert "Revert "Respect EditorConfig settings" (#3213 )"
This reverts commit d2241fc0d5
.
* Comment out EditorConfig docs
See https://github.com/prettier/prettier/pull/3213#issuecomment-343009769
* editorconfig: Support `indent_size = 0`
See https://github.com/prettier/prettier/pull/2760#discussion_r137447715
and c38b84c42a
* Revert "Comment out EditorConfig docs"
This reverts commit ddfa529c55cac4853a1e76e00c8b5e3ef158c01f.
* Mark EditorConfig functionality as v1.9.0+
See https://github.com/prettier/prettier/pull/3255#discussion_r150432508
* editorconfig: Upgrade editorconfig-to-prettier to 0.0.4
* editorconfig: Only enable for CLI, by default
https://github.com/prettier/prettier/pull/3255#issuecomment-348420546
* editorconfig: Add tests confirming that editorconfig is ignored by default in the API
https://github.com/prettier/prettier/pull/3255#issuecomment-348420546
* editorconfig: Add/fix CLI option parsing
* editorconfig: Move docs from configuration.md to options.md
* editorconfig: Add `oppositeDescription` to show docs for `--no-editorconfig`
Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154542792
* editorconfig: Update test snapshots
* editorconfig: Remove unnecessary options parsing code
Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154544560
* editorconfig: Move docs from options.md to api.md and cli.md
Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154545979
* resolveConfig: return null if both .prettierrc and .editorconfig are missing
Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154574613
* Don't add now-failing tests
The way these tests work, both `tests_integration/cli/config/.prettierrc`
and `.prettierrc` apply to `tests_integration/cli/config/editorconfig/file.shouldnotexist`,
so the test wouldn't work even on master. Here's a way to confirm that:
```js
const path = require('path')
const assert = require('assert')
const prettier = require('./')
const file = './tests_integration/cli/config/editorconfig/file.shouldnotexist'
console.log(prettier.resolveConfig.sync(file))
assert(prettier.resolveConfig.sync(file) === null)
```
2017-12-05 09:28:27 +11:00
Ika
1122701053
fix(doc-printer): respect indent/align order ( #3383 )
2017-12-05 08:59:27 +11:00
Kevin Gibbons
8e377a1e56
Add support for flow mixins when using babylon ( #3391 )
2017-12-05 08:58:14 +11:00
Lucas Duailibe
ceabc48e01
Format CSS prop for emotion ( #3381 )
2017-12-03 03:25:17 -03:00
Ika
c1623d88e6
feat(markdown): preserve `break` style ( #3325 )
2017-12-03 15:02:13 +11:00
Lucas Azzola
8524ed5b6f
Fix printing of comments around decorators and class properties ( #3382 )
2017-12-03 14:59:35 +11:00
Lucas Duailibe
24036480c5
Massage ast for template literals inside a css prop
2017-12-02 23:45:34 -03:00
Lucas Duailibe
a9be90c5d4
Format CSS prop for emotion
2017-12-02 22:50:07 -03:00
Simon Lydell
d80728b5ff
Support toplevel interpolations in graphql tags ( #3370 )
...
* Refactor multiparser
* Add support for toplevel interpolations in graphql tags
* Update snapshots
* Fix JSX-in-markdown special-case
2017-12-03 12:31:23 +11:00
Ika
073c0b16d8
feat(markdown): add `proseWrap: "preserve"` option ( #3340 )
...
* test: add test case
* feat(markdown): add `proseWrap: "preserve"` option
* test: add tests
* docs(options): update `proseWrap`
* feat(markdown): change default to `proseWrap: "preserve"`
BREAKING CHANGE
* docs(options): update `proseWrap`
* test: specify option explicitly
* Fix lint after merge
* Fix error after merge
2017-12-02 09:48:40 +11:00
Brian Ng
d52d721cd1
Bump babylon to 7.0.0-beta.33 ( #3372 )
2017-12-02 09:39:10 +11:00
Lucas Duailibe
b2cca7eacc
Add support for JSX fragments ( #3237 )
2017-11-30 00:09:45 -03:00
Ika
7670024292
fix(markdown): do not break before special prefix ( #3347 )
2017-11-30 08:43:22 +11:00
Ika
fbbfa52517
fix(markdown): do not print linebreaks in heading ( #3343 )
2017-11-29 22:13:38 +11:00
Alex Rattray
606c5abbfc
Merge pull request #3324 from suchipi/arrow_parens
...
Simple arrow function parens option
2017-11-28 10:23:56 -05:00
Jacky Ho
a02e3b3464
Fix format of comment in paren of call expression in arrow expression ( #3334 )
2017-11-28 21:58:39 +11:00
Suchipi Izumi
6abdd2c6b7
PR feedback
2017-11-27 22:27:34 -07:00
Stephen Scott
a6c12ca7a9
Inline type parameters in test callback
2017-11-27 22:27:34 -07:00
Stephen Scott
e4eb8a4065
Add implementation for arrow parens option
...
Based on https://github.com/prettier/prettier/pull/2676
* Thread `path` and `options` through helpers so we don't need to add `needsParens` onto the AST node anymore (mutation)
* Pull test call detection logic out into helper method so it can be re-used for arrow function parens
* Add arrow function parens option implementation (avoid/always)
* Don't break arrow function parens around (done) in test call
2017-11-27 22:27:34 -07:00
Stephen Scott
9a1e408a3f
Add option and specs (no implementation yet)
...
These new snapshots are from https://github.com/prettier/prettier/pull/2676
2017-11-27 22:26:58 -07:00
Artem Sapegin
172d34e43d
Do not prepend / append with a semicolon the only JSX element in a program ( #3330 )
...
* Do not prepend / append with a semicolon the only JSX element in a program
Fixes #3196
* Limit single JSX element without semicolon to Markdown only
* Fix tests
2017-11-27 22:04:12 -07:00
Simon Lydell
56951a71b4
Don't lowercase element names and attribute names in selectors ( #3317 )
...
* Don't lowercase element names and attribute names in selectors
https://www.w3.org/TR/css3-selectors/#casesens
> All Selectors syntax is case-insensitive within the ASCII range (i.e.
> [a-z] and [A-Z] are equivalent), except for parts that are not under the
> control of Selectors. The case sensitivity of document language element
> names, attribute names, and attribute values in selectors depends on the
> document language. For example, in HTML, element names are
> case-insensitive, but in XML, they are case-sensitive.
Fixes #3304 .
* Fix number normalization in selector interpolation
2017-11-27 13:28:03 +01:00
Lucas Azzola
2dd76c6a95
Print parens around type assertions for decorators ( #3329 )
2017-11-27 23:10:33 +11:00
Ika
9b4ecec183
fix(markdown): preserve non-breakable whitespaces ( #3327 )
2017-11-27 19:37:52 +11:00
Lucas Duailibe
742a5c3d02
Don't add trailing comma after object rest spread in TypeScript ( #3313 )
2017-11-23 12:54:21 -02:00
Ika
a1d878acc7
fix(cli): respect `--ignore-path` when using `--stdin-filepath` ( #3309 )
2017-11-23 21:54:04 +11:00
Ika
76efb33e75
chore: setup markdown formatting ( #3224 )
...
* chore(deps): upgrade prettier to v1.8.2
* chore: setup lint-docs script
* docs: add `<!-- prettier-ignore -->`s
* docs: format docs
* Revert "docs: format docs"
This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53.
* chore(prettierrc): set `--no-prose-wrap`
* docs: format docs
* Revert "docs: format docs"
This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df.
* docs: tweak
* docs: format docs
* chore: rename .prettierrc
* chore: rename back to .prettierrc
* chore: split out third-party
* refactor: fix linting
* chore: do not split out third-party on website
2017-11-22 22:27:40 +11:00
Lucas Duailibe
759953ef6d
Template literals: Don't break on identifiers but break if comments ( #3299 )
2017-11-21 15:51:15 -02:00
Ika
d5a3abd7a6
fix(markdown): only indent the first non-list node in checkbox list item ( #3297 )
...
* fix(markdown): do not indent checkbox
* fix: keep alignment for first non-list node
* fix: force whitespaces
2017-11-22 00:01:59 +08:00
Ika
3cbbac3d08
fix(multiparser): fix markdown error and remove trailing new line ( #3293 )
2017-11-21 00:19:49 +08:00
Ika
b6f126eb29
feat(markdown): support TOML ( #3290 )
2017-11-19 17:38:25 +11:00
Christopher Chedeau
4b070c3a93
[flow] Do not break on empty type parameters ( #3281 )
...
Not only does breaking look bad but when you have trailing comma enabled, it puts a comma there which is not valid.
2017-11-16 14:36:37 -08:00
Lucas Duailibe
8e5c335bda
Mutate the doc.parts array when printing fill ( #3273 )
2017-11-16 09:55:55 -02:00
Lucas Duailibe
66d9b266e8
Skip assertDoc calls in production ( #3268 )
2017-11-16 09:54:57 -02:00
Ika
378cfee508
refactor(markdown): expose `hasPunctuation` to AST for better debugging ( #3272 )
...
* refactor(markdown): extract `punctuationRegex`
* refactor: expose `has(Leading|Trailing)Punctuaion` to AST for better debugging
* refactor: tweak
* refactor: tweak
* fix: no regression
* test: fix typo
2017-11-16 13:59:01 +08:00
Lucas Duailibe
482c83df20
Don't break self closing elements with no attributes ( #3250 )
2017-11-13 02:20:17 -02:00
Ika
d08df0b221
fix(markdown): handle punctuation variants ( #3254 )
...
* fix(markdown): handle punctuation variants
* docs: add comment
2017-11-13 00:09:04 +08:00
Lucas Duailibe
ece764a049
Preserve intentional new lines in GraphQL ( #3252 )
...
* Preserve intentional new lines in GraphQL
* Move function to bottom
* Rename arg
* Refactor
* Add comments in tests and support for arguments
2017-11-12 02:10:54 -02:00
Ika
bddbd1914d
fix(markdown): no extra whitespace between ascii punc and CJK char ( #3249 )
...
* fix(markdown): no extra whitespace between ascii punctuation and CJK character
* test: update snapshot
2017-11-12 00:38:18 +08:00
Ika
4ae52c5aa6
fix(markdown): do not enable splitText in inlineCode ( #3243 )
2017-11-12 00:29:59 +08:00
Ika
1cde865a11
fix(markdown): no extra whitespace between non-cjk and cjk-punctuation ( #3244 )
...
* fix(markdown): no extra whitespace between non-cjk and cjk-punctuation
* fix: no node v4 unsupported feature
2017-11-12 00:08:24 +08:00
Ika
4c6a7e8749
fix(markdown): escape all emphasis-like text ( #3246 )
...
* fix(markdown): escape all emphasis-like text
* test: add test case
2017-11-12 00:07:58 +08:00
Ika
92459047ed
fix(markdown): force print spaces ( #3225 )
2017-11-11 15:05:07 +08:00
Ika
49f578fb91
fix(markdown): do not break `inlineCode` ( #3230 )
2017-11-11 12:50:40 +08:00
Lucas Duailibe
658886aab1
Prevent adding semi in TypeScript interfaces when type has prettier-ignore ( #3103 )
2017-11-09 21:52:47 -02:00
Mitermayer Reis
813d9b93eb
Fix typos ( #3212 )
...
* Adding --stdin-filepath option in order to enable filetype inference from
stdin
* Fixing typo on the documentation
* Fixing typos - fixing some typos
* Restoring static lib files back since they are artifacts
2017-11-09 11:44:24 +11:00
Lucas Azzola
d2241fc0d5
Revert "Respect EditorConfig settings" ( #3213 )
...
* Revert "Respect EditorConfig settings (#2760 )"
This reverts commit 8f58ca0f48
.
2017-11-09 11:38:58 +11:00
Ika
7fb8e3fe43
fix(markdown): no break on link ( #3204 )
...
* fix(markdown): link/image url head is breakable
* fix(markdown): no break on link
2017-11-09 08:19:35 +11:00
Joseph Frazier
8f58ca0f48
Respect EditorConfig settings ( #2760 )
...
This fixes https://github.com/prettier/prettier/issues/42 .
It adds support for .editorconfig's `indent_style`, `indent_size`, `tab_width`,
and `max_line_length` properties.
It doesn't support the `end_of_line` property as described in
https://github.com/prettier/prettier/issues/42#issuecomment-327073326 ,
but that could be added later. The same goes for `quote_type`
(https://github.com/prettier/prettier-atom/issues/293#issue-267288335 ).
* Make test .prettierrc not set config for all file extensions
This makes it easier to keep tests isolated.
2017-11-08 14:30:28 -05:00
Ika
4f1a2c4108
feat(markdown): add `--no-prose-wrap` option ( #3199 )
...
* feat(markdown): add `--no-prose-wrap` option
* refactor: fix typo
* refactor: fix typo
* refactor: reduce duplicate code
* docs: mention the option is for markdown
2017-11-08 21:01:06 +11:00
Lucas Duailibe
a35257bacf
Print JSON top comments as leading comments of root node ( #3187 )
...
* Make JSON top comments be leading comments of root node
* Update snapshot
2017-11-08 09:01:09 +11:00
Lucas Duailibe
68a99cf4b2
Parenthesis around TSAsExpression inside TSAbstractClassDeclaration ( #3191 )
2017-11-08 08:59:15 +11:00
Ika
a1e3181340
refactor(markdown): simplify regex ( #3194 )
...
* refactor(markdown): simplify regex
* fix: check exact string for heading
2017-11-08 02:46:32 +08:00
Ika
18345817d8
fix(markdown): allow more cases that `_`-style emphasis is available ( #3186 )
...
* fix(markdown): add more cases `_`-style emphasis is available
* refactor: fix naming style
2017-11-07 23:33:29 +11:00
Lucas Duailibe
49b07c3983
Don't add trailing commas in JSXAttribute for arrow functions ( #3181 )
2017-11-07 22:37:36 +11:00
Ika
ffd198beaa
fix(markdown): handle additional spaces before `code` ( #3180 )
...
* fix(markdown): handle additional spaces before `code`
* test: update snapshots
* fix: ignore leading `\n` from indented `code`
* docs: add comment
2017-11-07 22:25:20 +11:00
Lucas Azzola
e733a7706d
Force JSON to no trailing comma in multiparser ( #3182 )
...
* Force JSON to no trailing comma in multiparser
* Switch to mutate next.options
2017-11-07 22:01:40 +11:00
Ika
9d616817be
fix(markdown): do not break on unbreakable place ( #3177 )
2017-11-07 21:10:41 +11:00