Commit Graph
1936 Commits
Author SHA1 Message Date
fisker Cheung 27b5cb4d9d Enable ESLint prefer-rest-params rule (#7400) 2020-01-23 10:36:18 +02:00
fisker Cheung e7f3cfd684 Simplify getLast (#7267) 2020-01-22 17:30:25 +03:00
Georgii Dolzhykov 37a7e9cd42 Merge branch 'master' into next 2020-01-22 14:55:22 +02:00
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
Cyrille David 97a878632c Support printing inline handlebars in html (through embed function) (#7306)
* Move old handlebars to html file

This kind of handlebars code is supposed to be in html files.

* Remove useless file

* Uglify our old handlebars file

* Move venerable hbs tests to their folder

Because of their config

* html: Use glimmer for script tags of type handlebars

* Record snapshots

* Add CHANGELOG entry

* Add the CHANGELOG test

* Make the PR changes more obvious
2020-01-21 08:55:29 +02:00
fisker Cheung 96d419b91a Fix srcset parse error (#7295)
* Fix srcset parse

* Don't swallow error

* fix srcset parse

* Add changelog

* Update case

* Fix quote style

* Make input ugly
2020-01-20 20:58:38 +02:00
James George f93a763f8c chore(doc-printer): Fixed minor typo (#7347) 2020-01-20 20:56:57 +02:00
fisker Cheung 9900174d50 HTML: don't treat colons as namespace prefix delimiters in tag names (#7273) 2020-01-20 16:39:19 +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 c97e96d31e Use lodash/partition (#7265) 2020-01-20 15:43:52 +03:00
fisker Cheung 5330d9d4a6 Fix error throws on unclosed tag in pre (#7392) 2020-01-20 13:49:36 +03:00
fisker Cheung 988a9a616d Tiny refactor (#7334) 2020-01-20 13:33:24 +03:00
Chad Carbert aa248378e6 handlebars: Add prettier-ignore (#7275) 2020-01-20 12:19:09 +02: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