Commit Graph

1054 Commits (bc027bd661e466e2eb25733bbe2549589ca646c8)

Author SHA1 Message Date
Evilebot Tnawi bc027bd661
fix(css): space after `if` in `else` at rule (#3921) 2018-02-07 19:53:28 +03:00
Evilebot Tnawi 517db8f5db
tests(css): comments in selectors (#3917) 2018-02-07 15:05:29 +03:00
Evilebot Tnawi 0e1358b5ca
Improve the printing of CSS at-rules (#3896)
fix(css): improve at rules print
2018-02-07 13:33:10 +03:00
Evilebot Tnawi 9e6bd15ade
fix(css): comments in selectors (#3909) 2018-02-07 13:20:13 +03:00
Christopher Chedeau 9ba0d69cb9
Upgrade flow to 0.64 (#3899)
* Upgrade flow to 0.64

This also enables spread operator on jsx on the flow parser:

```js
<div>{...list}</div>
```

I had no idea it was even a thing.

I had to comment out a flow test that no longer parses, but it's no longer in the flow repo and the comment said that it shouldn't be working anyway so I don't think it's going to be a problem.

* Fix build script
2018-02-06 09:01:58 -08:00
Evilebot Tnawi a6ab8a7e32
refactor(tests): restructure `at rules` tests (#3892) 2018-02-06 19:03:36 +03:00
Evilebot Tnawi 0bdceaa158
tests(css): declaration comments (#3906) 2018-02-06 18:48:24 +03:00
Evilebot Tnawi 1b13dc8974
fix(css): declaration comments (#3897) 2018-02-06 18:09:42 +03:00
Evilebot Tnawi 0e8f3acb59
tests(css): custom media (#3879) 2018-02-03 18:04:59 +03:00
Evilebot Tnawi ed2a9be58e
fix(css): stringify unquoted data urls (#3877) 2018-02-02 20:39:53 +03:00
Evilebot Tnawi f5e74cd70a
fix(css): at rules improve formatting and tests (#3828) 2018-02-02 18:06:47 +03:00
Lucas Duailibe aac38fca49 Force break if comment in return argument (#3665)
* Force break if comment in return argument

* add test case
2018-01-31 12:00:29 -05:00
Lipis 7a7eb17082
fix: Proper case for Prettier, JavaScript, TypeScript, GitHub, Less (#3848) 2018-01-31 11:56:05 +01:00
Evilebot Tnawi ed5f68844f
fix(css): scss `global` flag (#3844) 2018-01-30 17:53:37 +03:00
Evilebot Tnawi 22ba2bcb64
fix(css): don't remove semicolon in `less` ruleset declaration (#3841) 2018-01-30 14:16:07 +03:00
Evilebot Tnawi 386e2a9bd4
tests(css): attr function (#3825) 2018-01-30 14:06:52 +03:00
Salem 8c792121f2 Treat define calls like require (#3830)
* Treat define calls like require

See issue #3829. This commit keeps define calls as a unit when possible,
to prevent an extra indent in the body of an AMD-style define.

Rather than adding the "define" check in the same case as the existing
"require" check, I added a separate condition to explicitly call out the
fact that this checks for both AMD and CommonJS modules.

`yarn test -u` yields no changes, and `yarn lint` passes successfully.

* Added tests for define and require amd formatting

This tests the solution for issue #3829.

* Add babylon interpreter to require-amd test

* Merge require and define checks
2018-01-29 16:44:32 -05:00
Ika b529c634d1
fix(markdown): print multiline content correctly in footnoteDefinition (#3787)
* fix(markdown): print multiline content correctly in footnoteDefinition

* refactor: replace `ifBreak(line)` with `softline`

* refactor: fix linting
2018-01-27 00:48:47 +08:00
Evilebot Tnawi 640ffa949d
tests(css): `font-face` at rule (#3826) 2018-01-26 15:53:08 +03:00
Evilebot Tnawi e3369db2c1
fix(css): handle namespace in attribute selector (#3810) 2018-01-26 13:00:20 +03:00
Ika 03292a6488
fix(javascript): ternary with `--use-tabs` (#3745)
* test: add test cases

* test: add test cases

* fix(javascript): ternary with `--use-tabs`

* chore: add istanbul ignore comment

* fix: remove unnecessary condition

* docs(commands): update `align`

* fix: do not transform the middle part

* refactor: markAsRoot

* fix: print tabs in sub-ternaries

* docs(commands): update

* test: add a cool test case
2018-01-26 10:02:42 +08:00
Evilebot Tnawi acf5e66408
tests(css): prefixes property (#3822) 2018-01-25 15:56:28 +03:00
Evilebot Tnawi e90f766459
tests(css): `viewport` at rule (#3817) 2018-01-25 14:59:38 +03:00
Evilebot Tnawi ca949a46d2
tests(css): `supports` at rule (#3816) 2018-01-25 12:53:34 +03:00
Evilebot Tnawi a3bf378259
fix: handle YAML front matter block (#3802) 2018-01-24 19:44:09 +03:00
Evilebot Tnawi 5008836dc2
fix(css): remove whitespaces before ":" in scss maps (#3814) 2018-01-24 18:48:54 +03:00
Evilebot Tnawi b48fb2015a
tests(css): variables (#3813) 2018-01-24 17:00:02 +03:00
Evilebot Tnawi 2b300a0f40
tests(css): namespace at rule (#3811) 2018-01-24 16:27:02 +03:00
Evilebot Tnawi 4bffe76a42
tests(css): function parens (#3809) 2018-01-24 16:06:05 +03:00
Evilebot Tnawi 4c90608d11
fix: keep space between deep selector `>>>` (#3792) 2018-01-24 14:53:22 +03:00
Evilebot Tnawi 7797c93489
fix(css): ignore `media` params with scss interpolation (#3801) 2018-01-24 12:31:30 +03:00
Evilebot Tnawi d3004b51ea
feat: remove extra spaces in `url` inside `@import` (#3793) 2018-01-23 23:33:19 +03:00
Evilebot Tnawi d1f9598d68
tests(css): newlines around multiple and combinator selectors (#3800) 2018-01-23 21:12:45 +03:00
Evilebot Tnawi fc200c9432
fix(css): remove other types of whitespace in `clean` (#3799) 2018-01-23 20:57:23 +03:00
Evilebot Tnawi a52747eaec tests: multiple selector (#3796) 2018-01-23 10:35:00 -05:00
Evilebot Tnawi 11dd57e8ff tests: parens spaces (#3795) 2018-01-23 10:34:36 -05:00
Brian Ng a8fb1863a2
Merge pull request #3797 from prettier/feat-css-lowercase-wide-keywords
feat(css): lowercase wide keywords
2018-01-23 09:33:01 -06:00
Evilebot Tnawi b2e8c6d374 feat: remove extra spaces in attribute selector (#3794) 2018-01-23 10:30:20 -05:00
evilebottnawi 591ee5a425 feat(css): lowercase wide keywords 2018-01-23 18:10:39 +03:00
Evilebot Tnawi 3bc3e801c8
tests: `scss` syntax (#3757) 2018-01-23 14:33:18 +03:00
Ika 08b9e07207
fix(markdown): update remark-parse to v5.0.0 (#3780)
* fix(markdown): update remark-parse to v5.0.0

* test(markdown): ensure links with entities printed correctly

* test(markdown): ensure lists  interrupted by headings
2018-01-21 12:31:30 +08:00
Evilebot Tnawi 105914e45c fix: don't handle args of `@warn` and `@error` directives as media query list (#3769) 2018-01-19 17:00:06 -07:00
Evilebot Tnawi dbb494ed30 tests: `less` syntax (#3766) 2018-01-19 16:57:57 -07:00
Evilebot Tnawi 12441eb2dd fix: don't add comma after `url` in `@import` directive (#3770) 2018-01-19 16:56:28 -07:00
Evilebot Tnawi 17b3df9b8e tests: `@media` directive (#3772) 2018-01-19 21:31:20 -02:00
Evilebot Tnawi 74d25c37f0 fix: don't change case of function name (#3768) 2018-01-19 15:39:44 +01:00
wonderful-panda 3f788d4fb6 fix: *.vue with `lang='tsx'` is not formatted (#3763) 2018-01-18 00:20:55 -02:00
Ika de6bc4448f
fix(multiparser): respect 0-indent markdown-in-js (#3676)
* fix(multiparser): respect 0-indent markdown-in-js

* fix: use literalline for 0-indent

* test: add unexpected case

* fix: 0-indent

* test: add failing test

* refactor: simplify

* fix(doc): literallines respect `ind.root`

* docs: update commands

* fix: what a magic...
2018-01-17 12:52:42 +08:00
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
Evilebot Tnawi 64f1c06727 fix(scss/less): space after combinator operator (#3738) 2018-01-13 13:17:29 -02:00