Commit Graph

2850 Commits (952bc0cc039c034c5fe651864db528dcd9800e9e)

Author SHA1 Message Date
Ika 952bc0cc03
fix: get rid of CRLF (#5494) 2018-12-08 18:28:29 +08:00
Jed Fox b878a54e6a
Reformat the first version info in the option docs (#5604)
* Reformat the first version info in the option docs

* Make the italic text actually italic

* Update new options; reword the filepath docs
2018-12-07 13:16:31 -05:00
Lipis 7c1758de86
Update example for *.vue (#5605) 2018-12-07 16:34:26 +01:00
Laurin Quast 9d1fb93e86 feat: add mjml extension to html language (#5505) 2018-12-07 21:01:40 +08:00
Ika cd28c22dbe
feat(html): smart quote for attributes (#5590) 2018-12-05 11:15:09 +08:00
Ika 525c076be8 Bump Prettier dependency to 1.15.3 2018-11-30 10:30:52 +08:00
Ika a5ccfa1ecb Release 1.15.3 2018-11-30 10:29:15 +08:00
Ika 3cd1d003c0
fix(typescript): do not throw errors on bigint keyword (#5577)
- fix `Error: unknown type: "TSBigIntKeyword"`
- bump typescript to stable version
2018-11-30 10:12:32 +08:00
Ika 2247ce1aab
feat(angular): support interpolation in attributes (#5573) 2018-11-30 09:28:54 +08:00
Ika 3fcf69a7d5
fix(api): normalize file path for `getFileInfo` (#5570) 2018-11-29 11:04:44 +08:00
Ika 28b938da97
feat(html): update angular-html-parser (#5565)
- support [`htm`](https://github.com/developit/htm) (`<${Component}>content<//>`, `<div />`)
- preserve [bogus comments](https://www.w3.org/TR/html5/syntax.html#bogus-comment-state) (`<! ... >`, `<? ... >`)
2018-11-29 11:03:22 +08:00
Ika d124bbaacb test: update snapshots 2018-11-29 10:38:37 +08:00
Ika 1ecd2228b4
fix(vue): group slot-scope correctly (#5563) 2018-11-29 10:09:38 +08:00
Wei-Wei Wu c28dc2f19c Updating cosmiconfig to not cache .js config files when told not to (#5558) 2018-11-29 09:49:33 +08:00
Ika 0534735c2f
fix(vue): tweak semicolon for single expression in event bindings (#5519) 2018-11-29 09:28:35 +08:00
Christopher Chedeau 0af81c7695
Improve union types with leading comments (#5575)
We're running into this issue at Facebook because `// flowfixme` ignores the very next line, but in this case an empty line is added in-between which breaks the fixme.

Ideally the solution is to avoid adding a newline and we'd call it a day. Unfortunately it is tricky to implement in this particular case. The comment is already printed, including its \n. Yet, we want to indent the block and the only way to convince the doc printer to do so is to add an indent group --before-- the \n is printed, otherwise it's just going to indent on the next \n.

So this PR changes the output from one bad way to another, but the new way has the benefit of not breaking flow for Facebook, which makes our internal teams happier.

Note that the way we print the same construct with `&` is broken in the same way as with this PR. https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBbAngNQEMAbAVzkwF5MAKME4+4xhpl5tmgDgHYA2LgE5+g3gP5CRY6cL6iJE2fL4BKJAB0ombTt17tAegOYAwhGzYEMTftu7oFAGSYYAdwjOYACwBOTzABWACYA1gAeXgBmxCFowVEA5jEBaEGJyV6pIdEBCZkhQQGJIcQpXkGRCSFFWaWRXlWlaOWVwZElCUUlAZgqANwgADQgEAAOMACW6MighD4+EK4ACnMIaMgghABuEBNBQyAARj6EYCFwMADKo6cTUAnIMD7kw14w2MQA6l4T8Gg3YDglzWvwmW1+uA2YDQ62GdzQcB8MCWJwS2EIyEiJARwxSYQAQiczhdLoRLAAZO5wTHYuC4tBhS53JJwACKpAg8BpxBxIBuPgRPg2h0Ih1wxGgB1GPjuME+e28yC4AAZhtKIAjPidRhtpXBBVtqcM-ABHUgTPwowhojFILE8ukgBHYCaPZ6OtDM4hsjlcu204YwUXyoKKpAAJkDJwmxGZZgstpAUAcB1ICIAKqL1v6HQBfXNAA

Fixes #5572
2018-11-28 10:30:51 -08:00
Ika bd3834010c
chore(build): es5 compatibility for browser (#5560) 2018-11-28 12:52:05 +08:00
Ika 4dd7c79bbf
fix(html): correct column for error code frame (#5553)
- before
  ```html
  [error] test.html: SyntaxError: Unexpected character "/" (1:26)
  [error] > 1 | <div>footer content here<//>
  [error]     |                          ^
  ```
- after
  ```html
  [error] test.html: SyntaxError: Unexpected character "/" (1:27)
  [error] > 1 | <div>footer content here<//>
  [error]     |                           ^
  ```
2018-11-27 17:45:17 +08:00
Ika 05ad885c3c
feat(typescript): support BigInt (#5546) 2018-11-27 16:53:34 +08:00
Ika 3a5bbf5fd2
fix(typescript): do not change `module` into `namespace` and break/hug their body correctly (#5551) 2018-11-26 13:34:35 +08:00
Ika 99a3efaa7a
fix: update editorconfig-to-prettier (#5550) 2018-11-26 13:08:52 +08:00
Ika a7528ebea4
fix(ng,vue): do not normalize attribute names (#5549) 2018-11-26 12:09:19 +08:00
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Ika 66ada24961
feat(angular): do not print colon for ngIf (#5542) 2018-11-25 15:43:40 +08:00
Ika b6a04ab8ba
fix(html-in-js): do not add quotes for interpolation-only attributes (#5544) 2018-11-25 15:04:02 +08:00
Ika c788842fea
fix(javascript): add missing parens for binary in optionalMember (#5543) 2018-11-25 11:42:06 +08:00
Ika ab7f46bf40
feat(yaml): preserve the first document head end marker (#5502) 2018-11-25 10:30:25 +08:00
Ika a50a8e258c
fix(javascript): upgrade @babel/parser to 7.1.6 (#5530) 2018-11-24 21:47:47 +08:00
evelyn masso e12cd17be2 ensure --list-different + --write reports status code 0 (#5512)
* change exit code for list different and write

* update existing tests
2018-11-23 10:42:29 -05:00
Ika 7da4ed76ad
fix(html): do not touch comments (#5525) 2018-11-23 21:25:58 +08:00
Ika 228a8b0782
fix(html): do not add extra indent for js template in script (#5527) 2018-11-23 15:20:30 +08:00
Ika cdac9552ef
fix(vue,ng): do not normalize tag names (#5526) 2018-11-23 13:12:43 +08:00
Ika b2eadd234b
fix(vue): preserve custom block (#5458) 2018-11-23 12:33:48 +08:00
Ika 6ee2f464ac
feat(javascript): enable logical assignment (#5489) 2018-11-18 16:38:35 +08:00
Ika 85eb8cb0ea
chore: tweak azure-pipelines.yml (#5498) 2018-11-17 12:38:47 +08:00
Danny McCormick d53dcefaae Replace Appveyor badge with Azure Pipelines badge (#5492) 2018-11-15 19:35:51 -05:00
Ika 043a937de6
fix(markdown): do not trim content in inline-math (#5485) 2018-11-16 00:17:20 +08:00
Evilebot Tnawi e588533e16
chore(deps): update `postcss-scss` (#5481)
* chore(deps): update `postcss-scss`

* chore: trigger build
2018-11-15 17:23:26 +03:00
Ika 668e049a5e
feat(html): support ie conditional start/end comment (#5470) 2018-11-15 12:35:28 +08:00
Ika 4f63be05e8
fix(html): leading space for leading interpolation in textarea is sensitive (#5468) 2018-11-15 10:34:42 +08:00
Ika c00dcb97b0
fix(html): preserve content for element in `<pre>` correctly (#5473) 2018-11-15 10:34:27 +08:00
Huáng Jùnliàng d86f39cb83 fix(markdown): add more category to CJK regex (#5480)
The following characters should be treated as CJK character

```
3099..309A    ; Hira Kana # Mn   [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
309B..309C    ; Hira Kana # Sk   [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
```

Here is the [playground link](https://deploy-preview-5402--prettier.netlify.com/playground/#N4Igxg9gdgLgprEAuEhqhkFkMhahnYeoZ2EaGdQZoZ1AzBkEyGVczcnco8gHSmcGkGQEwZTB7BkHuGQGQjAdgw9AgAyAHhmGBHhmGAnhkDWDIEH7QJ0OgJIZAG3KB1BlIACANoA3ALpbAz+nLAFhGA-50CaDIGiGQMoMgCwZAEP89A2Qxj3E99NeBIf8BBDHyA8QyAMQyA+gyAMgzCgABygDRBgCFuslyAVgyAkQzJrIDGDGGAQAzMzCAANCAQAA4wAJbQAM7IoACGAE6NEADuAApNCLUo9XoQFQAmRSAARo31YADWcDAAyqWTFVAA5sgwjQCucMUAFjAAtgA2AOq7FfDVi2Bwc90XFXoXAJ7I4NW1xcvVcI0w7RMVgd6sgAGb1I4-YoAK2qAA8AEITaazOb1A5wAAyyzgYIhUJAsLhc2WKyOcAAipsIPA8ZCdiBFo0fo03sDGlNBm0oCNSi0ficJqU3ny4Cy9Ljio04ABHTYVaUA+pAkFIcH04o-A4VdZbBnVUnkqk03Fq-EMmD1UYnIYwXbIABMxQ29QqR1JAGEIAdgW8oNBJSBNj8ACpWnrqgl85YwG2DO3IADsAAYAL6poA) to show that current `prettier` adds redundant whitespaces around the characters.

The testcase text are copied from [半濁点 - Wikipedia](https://ja.wikipedia.org/wiki/%E5%8D%8A%E6%BF%81%E7%82%B9) and [ヴ - Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%B4) respectively.
2018-11-15 00:10:50 +08:00
Ika 5c479cc55f
fix(typescript): do not add invalid semi for construct in interface with prettier-ignore (#5469) 2018-11-14 21:35:37 +08:00
Jed Fox c4b54e178f
Delete Appveyor config (ref #5410) 2018-11-14 08:32:32 -05:00
Danny McCormick 18b03a31cc Fix tests for Windows and add Azure Pipelines for cross platform CI (#5410)
* Add azure pipelines

* Add gitattributes

* Updating tests to work on Windows or Unix

* Lint

* Cleaning up

* Fixing names

* Clean up naming

* try to consolidate images

* Clean up

* Add back txt to gitattributes
2018-11-14 07:55:50 -05:00
Ika 57b057cfa2
fix(typescript): inline method decorators should stay inlined (#5444) 2018-11-14 10:13:35 +08:00
vrde 81a72cc2d6 Add more information on how to configure ALE (#5454)
Docs on how to configure Prettier with ALE didn't work out of the box for me, since multiple linters with conflicting configurations were run. This PR invite users to explicitly disable default linters.

Fix #5447 

- [x] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/master/CONTRIBUTING.md).
2018-11-12 22:01:30 +02:00
Jérémie Astori 45a4309939 Add HTML to the list of supported language in the docs (#5427) 2018-11-11 14:32:16 +08:00
Ika 5726df774e Bump Prettier dependency to 1.15.2 2018-11-11 01:10:29 +08:00
Ika 4b2d8c1b5f Release 1.15.2 2018-11-11 01:08:51 +08:00