Commit Graph
1926 Commits
Author SHA1 Message Date
Georgii Dolzhykov 8efa29ca0c fix object literal checks in isSimpleCallArgument (#7403) 2020-01-21 17:55:43 +02:00
fisker Cheung e8009fa102 GraphQL: improve detection of separator between interfaces (#7305) 2020-01-21 13:18:53 +02:00
b47f7bae43 RFC: Always add a space after the function keyword (#3903)
* Always add a space after the `function` keyword

* WIP update snapshots

* WIP put generator function asterisk before space

https://github.com/prettier/prettier/issues/3847#issuecomment-363449250

* WIP update snapshots

* Add changelog

* Add tests for anonymouse generator function

* print space between `function` and generator star

* update changelog

* print space between yield and *

Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-20 16:26:47 +02:00
fisker Cheung 988a9a616d Tiny refactor (#7334) 2020-01-20 13:33:24 +03:00
fisker Cheung 00d2299bce Fix prefer-object-spread in src/config (#7354) 2020-01-19 13:42:48 +02:00
fisker Cheung 50a0136c5f Fix prefer-object-spread in src/language-markdown (#7350) 2020-01-19 01:25:36 +02:00
fisker Cheung 657b85ee9e Fix prefer-object-spread for src/language-yaml (#7349) 2020-01-19 01:22:18 +02:00
fisker Cheung 288bf5ee3d Fix prefer-object-spread in src/language-css (#7351) 2020-01-19 01:20:58 +02:00
fisker Cheung d4c816959a Fix prefer-object-spread in src/language-html (#7352) 2020-01-19 01:15:12 +02:00
fisker Cheung 9fccf61a0d Fix prefer-object-spread in /src/cli (#7356) 2020-01-19 01:06:33 +02:00
fisker Cheung 19edf6e09b Fix prefer-object-spread in src/language-js (part 3) (#7360) 2020-01-19 00:59:05 +02:00
fisker Cheung 278efbe104 Fix prefer-object-spread in src/document (#7353) 2020-01-19 00:57:54 +02:00
fisker Cheung 61f7a09483 Fix prefer-object-spread in src/language-js (part 2) (#7359) 2020-01-19 00:56:28 +02:00
fisker Cheung 751c134964 Fix prefer-object-spread in src/language-js (part 1) (#7358) 2020-01-19 00:55:37 +02:00
fisker Cheung c2430bf545 Fix prefer-object-spread in src/language-js (part 4) (#7361) 2020-01-19 00:54:22 +02:00
fisker Cheung 11c4cea68a Switch parse-srcset to srcset (#7381) 2020-01-19 00:44:44 +02:00
Sosuke Suzuki ac72cd3e94 Merge branch 'master' into next 2020-01-18 06:49:52 +09:00
Georgii Dolzhykov 3fd0d56a95 angular: fix i18n attr with @@ (#7371)
* angular: fix i18n attr with @@

* changelog
2020-01-16 15:57:33 +02:00
fisker Cheung 5c06775c3b Fix prefer-object-spread in src/common (#7355) 2020-01-16 15:56:28 +02:00
fisker Cheung e5234162eb Fix prefer-object-spread in src/main (#7357) 2020-01-16 15:54:58 +02:00
Kohei Ueno 9c9ff092f5 Fix: remove unnecessary parens when yielding jsx (#7367)
* support YieldExpression inside jsx

* add test cases

* add changelog for pr-7367

* fix changelog file name
2020-01-16 15:54:23 +02:00
fisker Cheung 2041a0df95 Simplify getSupportInfo (#7269) 2020-01-16 13:24:21 +03:00
fisker Cheung 4abd19ae14 Use array destructuring for some simple case (#7330)
* Use array destructuring for some simple case

* Revert [0]
2020-01-15 19:24:52 +02:00
fisker Cheung b6ed57130d Tiny refactor comment.js (#7331) 2020-01-15 16:21:09 +02:00
fisker Cheung dd1721f68e Remove an old fix for Node 4 (#7328) 2020-01-15 16:16:04 +02:00
Georgii Dolzhykov 7e3c0c73b3 Merge branch 'master' into next 2020-01-14 20:36:21 +02:00
fisker CheungandGeorgii Dolzhykov d456b158e0 Style: use object destructuring (#7325)
* Style: use object destructuring

* Update versions.js

* Update sync-flow-tests.js

* Update core.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-14 17:30:18 +02:00
fisker CheungandGeorgii Dolzhykov 493df07019 Style: enable eqeqeq (#7324)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-14 17:10:25 +02:00
fisker Cheung dd77e146b9 using object spread for createLanguage (#7268) 2020-01-14 16:47:39 +02:00
fisker Cheung 7ff6347398 Style: enable prefer-spread (#7270) 2020-01-14 14:05:28 +02:00
fisker Cheung 5bfc5de410 Simplify arrayify (#7266) 2020-01-14 14:02:54 +02:00
fisker Cheung 85eefb918e Style: enable object-shorthand (#7322) 2020-01-14 14:25:24 +03:00
fisker Cheung c238bb68ec Style: enable dot-notation (#7323) 2020-01-14 13:20:07 +02:00
fisker Cheung c68d6e3c2b Move doc directory to document (#7272) 2020-01-14 13:58:42 +03:00
fisker Cheung beeaa98cb9 Fix quote style, enable quote rule (#7304) 2020-01-14 13:58:20 +03:00
fisker Cheung 02c161cf33 Fix: don't throw on broken html (#7293) 2020-01-13 17:31:03 +03:00
fisker Cheung b91277bae6 Update semver to v7 (#7256) 2020-01-13 15:26:44 +03:00
Misha KaletskyandGeorgii Dolzhykov 911fe7776e method chain breaking heuristic (#6685)
* examples from various issues about method chaining

this commit includes no prettier functionality changes, so that diffs will be easily visible.

specifically:

* https://github.com/prettier/prettier/issues/4125
* https://github.com/prettier/prettier/pull/4765
* https://github.com/prettier/prettier/issues/1565
* https://github.com/prettier/prettier/issues/3107

* add heuristic for breaking method chains

* fix: remove unnecessary escape characters

* initial non-regex isSimple implementation

* handle babel literal types properly

found here: https://github.com/babel/babel/blob/fe258dec047f473fb5a35172b2ff8cb172051dec/packages/babel-parser/ast/spec.md

* template literal + test

* use !every instead of some(!)

* fix: some test cases

* fix: object expressions and some more simple node types

* some test cases showing need for depth check

* depth check

* update test to test thing it's supposed to test

* optional expressions

* test case for missing isSimple depth

* fix isSimple depth bug

* fix: comment check

* test for ts non-null operator

* make object properties behave similarly to arrays

* isSimple -> isSimpleCallArgument; move to utils; add unaries

* add Import to the list of simple things

* only short regexps to be considered simple (<= 5 chars)

* add changelog entry in the new format

* update snapshots

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-10 18:00:23 +02:00
fisker CheungandGeorgii Dolzhykov ea23fc5d92 Update cosmiconfig to v6 (#6850)
* Update `cosmiconfig` to v6

* fix changes required

* style

* replace parentModule logic

* fix build script

* fix import-fresh

* fix rebase consequences

* remove babel-plugin-transform-async-to-promises

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-10 03:21:44 +02:00
Lipis 3a96c6d542 Merge branch 'master' into next 2020-01-10 00:41:30 +02:00
Daiki Ihara 209cee6cea Scss: fix scss variable string concatenation removing spaces (#7211) 2020-01-09 23:38:16 +02:00
Georgii Dolzhykov 5f2384e497 use lodash/* instead of lodash.* (#7235) 2020-01-09 17:48:02 +02:00
Georgii Dolzhykov 42e7f7f1a5 Merge remote-tracking branch 'remotes/upstream/master' into next 2020-01-09 16:55:41 +02:00
Sosuke Suzuki 332a55179e Vue: format sfc jsx (#7180)
* Modify to enable to format vue jsx sfc

* add changelog

* Modify to avoid cspell checking, "sfcs" -> "SFC"
2020-01-09 05:14:19 +09:00
1e65456960 markdown: fix redundant leading spaces in markdown list (#7178)
* fix rebundant leading spaces in markdown list

* add test for rebundant leading spaces in markdown_list

* add changelog_unreleased file of pr-7178

* Update changelog_unreleased/markdown/pr-7178.md

Co-Authored-By: Sosuke Suzuki <aosukeke@gmail.com>

* Update changelog_unreleased/markdown/pr-7178.md

Co-Authored-By: Sosuke Suzuki <aosukeke@gmail.com>

* fix minor issues

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-08 16:27:28 +02:00
Kohei Ueno 5d165eb850 Fix printing both index signatures without type annotations and… (#7228) 2020-01-08 16:19:34 +02:00
Panayiotis Lipiridis 35fe9ccada Merge with master 2020-01-08 14:43:19 +02:00
Cyrille David 0bb75fd1b9 handlebars: Fix superfluous line breaks in ConcatStatement (#7051) 2020-01-08 14:24:45 +02:00
Daiki Ihara 87d532b1b6 Markdown: fix PR 7181 broke HTML blocks inside list items (#7220)
* fix PR 7181 broke HTML blocks inside list items

* add test for indented html after list item

* add changelog_unreleased for pr-7220

* update changelog of pr-7181

* fix pointed out
2020-01-07 23:17:52 +02:00
Kohei UenoandGeorgii Dolzhykov e11b6e8992 Fix adding unnecessary colons on Mapped Types (#7221)
* fix #7174 by checking typeAnnotation existance

* add changelog for pr-7174

* fix typo

* revert mappedType test in conformance/

* add new directory and tests

* fix missing a line

* Update changelog_unreleased/typescript/pr-7174.md

Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-06 22:25:22 +02:00