Ika
165742014a
fix(markdown): preserve leading/trailing newlines in fenced code block ( #5038 )
2018-09-01 13:35:29 +08:00
Ika
4ce28d3ef4
fix(markdown): inline footnote def if there's only one 1-line paragraph ( #5025 )
2018-09-01 13:14:22 +08:00
Ika
669282e32a
fix(markdown): stably print lists in front of whitespace-only trailing newline ( #5024 )
2018-09-01 12:14:53 +08:00
Ika
55e620bdc7
chore: extract jest snapshot serializers ( #5034 )
2018-09-01 12:11:19 +08:00
Lipis
2e8366a84e
Update tools and dependent project numbers ( #5033 )
2018-08-31 10:52:37 +03:00
Ika
49e2f77bff
refactor: extract options-normalizer/validator ( #5020 )
...
- Uses [`vnopts`](https://github.com/ikatyang/vnopts#readme )
- This way it should be easier to support language-specific options (https://github.com/prettier/prettier/pull/4798#issuecomment-407258477 ) and map the common options to language-specific options using [`forward`](https://github.com/ikatyang/vnopts#forward ), e.g. `singleQuote: true` -> `"javascript/singleQuote": "js"`, `singleQuote: false` -> `"javascript/singleQuote": "none"`.
2018-08-31 11:26:07 +08:00
Ika
32390cd6a3
fix(vue): do not pass `<script src>` into multiparser ( #5031 )
2018-08-31 09:28:55 +08:00
Eric Sakmar
93e8b15311
verify the precedingNode type when handling import declaration comments ( #5016 )
2018-08-27 20:02:40 -06:00
Felix Wu
8779937a07
Bugfix/ Leave Dangle Comments in NewExpression ( #5017 )
...
```js
new Thing(/* comment */)
```
now stays the same instead of being formatted into
```js
new Thing /* comment */()
```
2018-08-27 09:23:14 +08:00
Ika
58d34bb844
refactor: language extend ( #4994 )
2018-08-22 10:12:57 +08:00
David
dda7c265d0
Update configuration to be clearer about js config ( #4993 )
...
So in the list, it says to use `prettier.config.js` as your file name for configuring prettier in js. But in the example it has `//.prettierrc.js`. This confused me so I tried both file names. Both these file names work to configure prettier so I updated the docs to reflect that.
2018-08-20 12:33:02 +08:00
Jed Fox
a687b9383b
Add a label that exempts issues from auto-locking ( #4987 )
...
* Add a label that exempts issues from auto-locking
* Exempt the “awaiting response” label so people can always reply and have their issue reopened
2018-08-19 07:33:20 -04:00
Malcolm Groves
d480858f01
Fix ternary format in function call ( #4368 )
...
* Fix ternary format in fn call
* Formatted to align with linter
* Update jsfmt.spec.js.snap
* Update jsfmt.spec.js.snap
* test: remove obsolete snapshot
2018-08-15 13:29:04 -04:00
Ika
1790211f76
feat: support MDX ( #4975 )
...
* feat: support MDX
* refactor: flip condition
2018-08-13 22:23:09 +08:00
TitanSnow
2de54dc4d8
remove redundant ASI protection for BindExpression ( #4970 )
2018-08-13 22:17:28 +08:00
Ika
6ba6138d09
feat(yaml): prefer implicit key for empty value ( #4972 )
...
* feat(yaml): prefer implicit key for empty value
* fix: prefer `?` for `!!set`
* refactor
2018-08-12 13:38:14 +08:00
Ika
82a12a58a8
fix(config): better error message for unsupported extension ( #4969 )
2018-08-11 16:35:18 +08:00
TitanSnow
b0a33b7326
fix #4963 : parens are incorrectly stripped in BindExpression ( #4964 )
...
* fix #4963
* lint code
* fix more incorrectly paren stripping
* always need parens when UnaryExpression in BindExpression
* lint code
2018-08-09 14:44:13 -03:00
Ika
26fd292ece
Bump Prettier dependency to 1.14.2
2018-08-09 11:05:58 +08:00
Ika
98cca8f66f
Release 1.14.2
2018-08-09 11:04:36 +08:00
Ika
53c83f97f5
fix: guess line ending before preprocess ( #4957 )
2018-08-09 10:51:08 +08:00
Ika
3842cbb118
fix(typescript): use the first error when both failed ( #4947 )
2018-08-09 10:21:00 +08:00
Ika
4fb2070244
Bump Prettier dependency to 1.14.1
2018-08-09 00:38:53 +08:00
Ika
35d0ff1d3f
Release 1.14.1
2018-08-09 00:36:36 +08:00
Ika
8973caf4bb
chore: improve release scripts ( #4933 )
...
- use the latest git tag as the previous version
- restore/bump the version on master in `bump-prettier.js`
- use `stdio: "inherit"` for `npm publish` so that we could input the OTP
- do not use `--runInBand` for local `test:dist`
- remove `Updating integration snapshots`
- remove `Attach all files in dist/ folder`
2018-08-08 23:49:22 +08:00
Ika
4d2f224919
fix(javascript): add parens for unary in bind ( #4950 )
...
* test: add tests
* fix(javascript): add parens for unary in bind
2018-08-08 23:48:12 +08:00
Ika
e72cb538f9
fix: update flow support info ( #4943 )
2018-08-08 23:47:49 +08:00
Adrian Leonhard
c83d5b15e7
Fix #4886 and add test. ( #4954 )
2018-08-08 09:24:25 -06:00
Brian Ng
1391891ef6
Print ObjectTypeInternalSlot with both flow/babel parsers ( #4869 )
...
* Print ObjectTypeInternalSlot with both flow/babel parsers
* chore: update to flow-parser@0.78.0
* test: update snapshot
2018-08-08 09:21:39 -06:00
Suchipi
418a04bf2b
Revert this/super blacklist for function composition heuristic ( #4936 )
2018-08-08 09:18:46 -06:00
Ika
308863e061
fix(typescript): no invalid output for ImportType in TypeReference ( #4939 )
2018-08-07 18:53:11 +08:00
Jed Fox
a3ab95abe9
Add a pull request template ( #4825 )
...
* Add a pull request template
* Run Prettier
* Address review comments
* ’
* If
2018-08-03 06:28:10 -04:00
Jorge Gonzalez
7d78ce68ef
feat(config): support TOML configuration files ( #4877 )
...
* Add initial support for TOML in configuration files
* Missed brace
* Fix snapshots
* refactor: move loadToml to utils
* Use @iarna/toml
* Add tests for loadToml
* Fix test for CI
* Remove jest-extended
* Create snapshot for load-toml
* Add feat to docs
* lint docs
* Use @iarna/toml/parse-string
* Change path string
2018-08-03 06:27:19 -04:00
Ika
42ba638f37
fix(yaml): update parser ( #4931 )
...
* test: add tests
* fix(yaml): update parser
2018-08-03 15:10:26 +08:00
Christopher Chedeau
3b3240bdb8
[assignment] proper group ( #4932 )
...
If you have
```js
a = b
```
we used to do
```js
group[a = b]
```
which works most of the time but has the unfortunate side effect that if the left part breaks, we're going to break the `=` as well. So you get
```js
{
a
} = \n
b
```
What this PR does it to add a group
```js
group[a group[= b]]
```
so that if the right hand side fits in one line, it should stay that way.
Note that there's a change with a comment being move but I think that it's fine. If I remember correctly, this test was to make sure that we didn't print invalid code, not that it had to be respected (that comment position is not something we really want to support in the first place).
Fixes #4645
2018-08-02 20:26:31 -07:00
Brian Ng
1597578b05
Bump babel-parser ( #4910 )
2018-08-02 22:19:21 -05:00
Ika
b6077e175e
fix(yaml): end comment in nested mapping ( #4918 )
...
* test: add tests
* fix(yaml): end comment in nested mapping
2018-08-02 22:38:16 +08:00
Ika
10df246772
feat(yaml): do not put singleline values on a separate line from the key ( #4916 )
...
Only apply to `alias` and `plain`/`quoteSingle`/`quoteDouble` with
- no backslash newline
- or no literal newline and `proseWrap: preserve`
- or no newline and `proseWrap: never`
- or no whitespace and `proseWrap: always`
in mapping items with implicit key, otherwise it's impossible to do prose wrapping.
2018-08-02 00:15:33 +08:00
Paul Chavard
783923a81b
fix(glimmer): preserve empty text attributes ( #4897 )
2018-08-01 12:45:36 -03:00
Ika
1915cc3c46
chore: enable glimmer parser on preview playground ( #4915 )
2018-08-01 15:44:37 +08:00
Ika
d83ca5a6c6
fix(yaml): prefer dash as document separator ( #4921 )
...
* test: add tests
* fix(yaml): prefer dash as document separator
2018-08-01 14:10:06 +10:00
Ika
4b8e18f978
docs(related): add prettylint ( #4914 )
2018-07-31 01:21:31 +08:00
Lucas Azzola
a938076ae5
Ignore .git, .svn and .hg directories ( #4906 )
...
Fixes #4895
2018-07-30 00:08:51 +10:00
Ika
440ab4f60b
refactor: upgrade to cosmiconfig@5 ( #4899 )
...
* refactor: upgrade to cosmiconfig@5
* fix: use custom require
2018-07-29 16:57:36 +08:00
Ika
435e8532cb
docs(changelog): fix link
2018-07-29 15:54:05 +08:00
Ika
78ca79e6b7
chore: bump master version to 1.15.0-dev
2018-07-29 15:52:03 +08:00
Ika
514fcb835a
chore: bump Prettier dependency to 1.14.0
2018-07-29 15:44:21 +08:00
Ika
9bac11907c
Release 1.14.0
2018-07-29 15:33:12 +08:00
Ika
c2d90f14d8
docs(blog): 1.14 release ( #4857 )
2018-07-29 15:25:22 +08:00
Ika
f0f45a2621
chore(scripts): fix checkSchema command
2018-07-29 15:04:33 +08:00