Commit Graph
75 Commits
Author SHA1 Message Date
chimuraiandfisker Cheung 794d9d1558 bugfix(graphql): Keep useful empty lines in description (#13013)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-06-16 13:33:09 +08:00
fisker Cheung a9de2a128c Minor refactor (#12681) 2022-04-24 10:28:20 +08:00
29c4a3e559 bugfix(graphql): Fix single line and empty description formatting (#12608)
Co-authored-by: Harry Hopkinson <63599884+Harry-Hopkinson@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-22 20:38:44 +08:00
fisker Cheung b40a5d03d6 Refactor: Simplify printSequence() (#12535) 2022-03-31 21:04:12 +08:00
Trevor Scheerandfisker Cheung 570c3180b9 [graphql] Add support for printing SchemaExtension nodes (#12519)
* Add support for printing SchemaExtension nodes

* Add changelog entry

* Lint

* Update 12519.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-03-27 00:59:04 +09:00
Trevor Scheer 20f06ccb2a Print descriptions on graphql schema definition nodes (#11901)
* Failing test

* Add description, test passes

* Add changelog entry
2021-12-03 14:42:09 +09:00
fisker Cheung 754531032d Enable regexp/no-unused-capturing-group rule (#11013) 2021-09-08 11:18:07 +08:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
fisker Cheung e1afe1adc2 Remove parser getters from universal bundles (#11137) 2021-07-13 15:16:31 +08:00
fisker Cheung 8f17187bf7 Reduce parser-graphql size (#10903) 2021-05-19 09:23:31 +08:00
Patrick Ahmetovic cbdc8aa376 GraphQL: Fix missing space after keyword in anonymous operations (#10689) 2021-04-12 11:50:39 +03:00
fisker CheungandGeorgii Dolzhykov 7cc52da144 Simplified printGenerically (#10557)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-22 16:57:03 +02:00
fisker Cheung 863eb079dc Forbid AstPath.call without name (#10541) 2021-03-15 17:20:27 +08:00
fisker Cheung d3a0699148 Rename n to node (#10504) 2021-03-10 22:14:08 +02:00
fisker Cheung f04b2b991c Enable no-implicit-coercion rule (#10186) 2021-02-01 13:14:04 +08:00
fisker Cheung dd606d9ce1 Enable unicorn/no-array-push-push (#10111)
* Enable rule

* Apply auto-fix

* Manual fix
2021-01-23 22:37:01 +02:00
fisker Cheung 12bddae20c Switch default branch to main (#10115) 2021-01-23 19:14:13 +02:00
fisker Cheung 7b24335064 Refactor: Use Doc[] instead of concat() (#9993) 2021-01-11 13:46:05 +08:00
fisker Cheung 358ad36a84 Forbid use concat() in concat() (#9998) 2021-01-11 10:19:13 +08:00
fisker CheungandSosuke Suzuki 7ec7a0f21f Fix using concat() on single Doc (#9994)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-01-04 14:40:02 +08:00
fisker Cheung 85abe0fccd Refactor graphql parser to use tryCombinations (#9928) 2020-12-18 19:20:20 +08:00
fisker Cheung ec5f60725b Send array to FastPath#{each,map} callback (#9901) 2020-12-17 15:52:51 +08:00
fisker Cheung c7e354e38c Add isNonEmptyArray (#9902) 2020-12-17 14:46:59 +08:00
Sosuke Suzukiandfisker Cheung 4cc149248a Support TypeScript 4.1 via typescript-estree (#9636)
* Update typescript and typescript-estree

* Add AST transformation for TSTemplateLiteralType

* Update tests for template-literal-types

* Fix transformChainExpression

* Update tests for key-remapping-in-mapped-types

* Implement recoverInvalidDecorators

* Update changelog

* Avoid typecheck error

* Add os.platform() shim

* Update config.js

* Update config.js

* Shim os.cpus

* Update `process.versions.node`

* Attempt to fix build

* Update ts parserOptions

* Fix code style

* Remove `errorOnUnknownASTType`, fix code style

* Use `[] ||` instead of `[] //`

* Fix hack

* Add invalid tests

* checkMissingDecorators

* Update tests

* Fix tests

* Add comment

* Revert "Implement recoverInvalidDecorators"

This reverts commit 27e7b46ed41df36fb585791117c85e1b2dab932c.

* Add ref pr link

* Simplify logic

* Don't transform `TSTemplateLiteralType`

* Add `TSTemplateLiteralType` as simple type

* Fix tests

* Update comments

* Add comment

* Fix logic

* Minor tweak

* use multiple parsers

* Update @typescript-eslint/typescript-estree to v4.8.0

* Switch to `parseWithNodeMaps`

* Rename `esNode` -> `esTreeNode`

* Update @typescript-eslint/typescript-estree to 4.8.1-alpha.1

* Use @typescript-eslint/typescript-estree 4.8.1

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-11-18 10:59:58 +09:00
fisker Cheung 60a5729a19 Move prettier-ignore related functions into language-js/ (#9555) 2020-11-10 09:12:46 +08:00
fisker Cheung 9e9cc85072 Enable directly-loc-start-end for all languages (#9610) 2020-11-10 09:06:08 +08:00
fisker Cheung 309ffdd562 Refactor: Use ignoredProperties for all languages (#9586) 2020-11-05 14:12:14 +08:00
fisker CheungandGeorgii Dolzhykov fbee029497 Add index to FastPath#each() callback (#9499)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-30 12:27:20 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
Sosuke SuzukiandGeorgii Dolzhykov 7463b9dd15 GraphQL: Fix formatting for directives in fields (#9116)
* Fix formatting for directives in FragmentDefinition

* Add changelog

* Update src/language-graphql/printer-graphql.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>

* Fix by Prettier

* Refactor

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-09-03 02:57:17 +09:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00
fisker Cheung c6b3ed6e1c Enforce .json extensions (#8908) 2020-08-06 00:37:16 +08:00
fisker Cheung f8e6c215ce Refactor: Move parsers to language index (#8765) 2020-07-17 09:06:00 +08:00
fisker Cheung 350f641fca Fix util import (#8696) 2020-07-05 00:34:35 +08:00
fisker Cheung 0c2b918078 ESLint: enable import/order (#8635) 2020-06-26 20:30:21 +08:00
004cacda97 Improve wrapping of GraphQL fragment directives (#7721)
* fix GraphQL line wrapping for fragment directives is ugly

* update test of graphql for fixing directives

* add changelog_unreleased for pr-7721

* fix graphql directive

* update test of graphql

* update changelog_unreleased

* Update changelog_unreleased/graphql/pr-7721.md

Co-authored-by: Jed Fox <git@twopointzero.us>

* Fix comment in changelog

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-05-06 11:27:49 +03:00
fisker Cheung f0207e6850 Enable unicorn/better-regex (#7991)
* Enable `unicorn/better-regex`

* Spellcheck ignore regex
2020-04-10 21:20:40 +08:00
fisker Cheung eca28c70c6 Fix graphql comments between interfaces (#8006) 2020-04-10 21:09:54 +08:00
fisker Cheung cf6f251b3c graphql: Allow interfaces to implement other interfaces (#8007)
* `graphql`: Allow interfaces to implement other interfaces

* Add changelog
2020-04-10 20:27:25 +08:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
fisker Cheung 2bfaa7c2cf Simplify createLanguage (#7509) 2020-02-17 16:39:08 +02:00
fisker Cheung 0c93198942 Remove deprecated parser & update sharedUtil (#6993)
* Remove some old stuff

* Add changelog

* Fix test

* util changes

* restore parser

* Fix `util` usage
2020-01-29 17:32:42 +03:00
fisker Cheung e8009fa102 GraphQL: improve detection of separator between interfaces (#7305) 2020-01-21 13:18:53 +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 Cheung dd77e146b9 using object spread for createLanguage (#7268) 2020-01-14 16:47:39 +02:00
fisker Cheung c68d6e3c2b Move doc directory to document (#7272) 2020-01-14 13:58:42 +03:00
Panayiotis Lipiridis 35fe9ccada Merge with master 2020-01-08 14:43:19 +02:00
Tim Kendall 1a18cf7fce GraphQL: Support repeatable directive definition printing (clos… (#7227) 2020-01-06 20:20:25 +02:00
fisker Cheung 596f55e324 Replace trim{Left,Right} with trim{Start,End} (#6994) 2019-11-18 21:22:24 +01:00