Commit Graph
31 Commits
Author SHA1 Message Date
Georgii Dolzhykov 53b59d2d39 Fix lineSuffixBoundary (#10122) 2021-01-28 00:29:34 +02:00
Georgii Dolzhykov 1df287acc8 Use default parameters where possible and other microrefactoring (#10135) 2021-01-27 12:36:39 +08:00
fisker Cheung ce26805e84 Enable unicorn/prefer-spread (#10129) 2021-01-26 09:46:14 +08:00
fisker CheungandGeorgii Dolzhykov 6175013ae3 Enable unicorn/no-array-for-each (#10112)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-01-24 19:26:42 +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 0009e0d276 Enable unicorn/prefer-regexp-test (#10045) 2021-01-12 20:37:05 +08:00
fisker Cheung 181a325c1c Enable unicorn/explicit-length-check (#9975) 2021-01-04 10:11:57 +08:00
fisker CheungandGeorgii Dolzhykov 9d9c0e2b6f Add Doc[] as Doc (#9733)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-01-04 10:04:30 +08:00
fisker Cheung f0f18d3090 Enable unicorn/prefer-number-properties (#9935) 2020-12-21 17:09:20 +08:00
fisker CheungandGeorgii Dolzhykov 52f0894611 Fix stripTrailingHardline function (#9736)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-12-07 10:07:34 +08:00
fisker Cheung 125492818c printDocToString: Don't check existance before replacing newLine (#9775) 2020-11-25 22:03:34 +08:00
Dang Mai 9d06174d55 Fix #9702 - Flush line suffix contents at the end of document (#9703)
* Failing test case for flushing line-suffix contents

* Flush remaining line-suffix contents at the end of document
2020-11-18 12:58:46 +02:00
Sosuke Suzuki 2c0e9838f2 Fix line breaks for CSS in JS (#9136)
* Fix 2.1 regression for css-in-js

* Add changelog
2020-09-04 13:12:58 +09:00
Chris Brodyandfisker cdc250c21a typecheck updates & fixes in src/language-js (#8759)
Co-authored-by: fisker <lionkay@gmail.com>
2020-08-21 09:08:14 +08:00
fisker Cheung 6ae716cd69 Rewrite a deep nested ternary makeAlign (#8931)
* Rewrite a deep nested ternary `makeAlign`

* Rename `ind`
2020-08-10 00:07:24 +08:00
Chris Brodyandfisker ba15a5768e Enable & fix typecheck for several languages (#8906)
Co-authored-by: fisker <lionkay@gmail.com>
2020-08-10 00:01:42 +08:00
fisker Cheung 3dbec5a9cd Minor refactor doc-utils (#8499)
* Minor refactor `doc-utils`

* Fix comment

* Restore `shouldRecurse`

* Revert "Restore `shouldRecurse`"

This reverts commit 699628166dab8c450ccb3a43b05bfbce1674c49b.

* Restore the mark
2020-06-05 16:21:23 +03:00
Sosuke Suzuki b4d1053bb4 Refactor: Use normalizeParts from document/utils in printer-markdown (#8496)
* Use normalizeParts from utils in printer-markdown

* Remove flatting for concat from normalizeDoc

* Fix undef parts

* Move normalizeDoc to doc-utils

* Add test for normalizeDoc

* Modify tests to avoid specllcheck errors
2020-06-05 12:47:24 +03:00
Sosuke SuzukiandGeorgii Dolzhykov 9c67e7b7f1 JavaScript: Fix indentation for binary expressions with trailing comments (#8476)
* Modify to align binaryish expression with trailing comment

* Add tests

* Add comment

* Add test

* Add changelog

* Fix by lint

* Modify to move transformation to printBinaryishExpressions

* Remove unnecessary new line

* Fix hasTrailingCommentInBinaryish

* Add shouldReturnParts option to printComments

* Add tests from review

* Fix by lint

* Extract and use normalizeParts

* Group CallExpression when parent node is binaryish

* Fix by lint

* Remove unnecessary change

* Wrap the doc of most left node with group

* Add tests

* Update pr-8476.md

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-04 08:59:05 +03:00
Sosuke Suzukiandfisker Cheung 915327d61d Vue: Support custom blocks (#8023)
* Support Vue Custom Block

* Add changelog

* Udpate snapshots

* Support "type" for json

* Remove guessing languages

* Modify to reuse inferScriptParser logic

* Implement withInnerParts arg for stripTrailingHardline

* Rename isVueCustomBlock

* Set `verbose: true`

* Use getParserName

* Ignore vueIndentScriptAndStyle

* tmp

* Fix formatting

* Add tests

* Fix by lint

* Revert "Set `verbose: true`"

This reverts commit f65c7cd7d814d3149aadbeb3cfd00c5372887c33.

* loop with i--

* Modify to preserve unknown langauge

* Support embeddedLanguageFormatting

* Fix by lint

* Fix mistake

* Modify to preserve unknown lang

* Remove unnecesary condition

* Add error tests

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-04-17 07:54:24 +09:00
fisker Cheung f0207e6850 Enable unicorn/better-regex (#7991)
* Enable `unicorn/better-regex`

* Spellcheck ignore regex
2020-04-10 21:20:40 +08:00
Sidharth Vinod 04e4ef3758 Uniform line endings for multi line strings/comments (#7891) 2020-04-05 13:51:29 +03:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
Shinigami 59e15ec744 Use spread syntax (convert to es2015) (#6317) 2020-02-25 03:05:49 +02:00
fisker Cheung 0370f47cb3 Refactor some Object.assign (#7437) 2020-01-31 09:13:37 +09:00
Georgii Dolzhykov 37a7e9cd42 Merge branch 'master' into next 2020-01-22 14:55:22 +02:00
James George f93a763f8c chore(doc-printer): Fixed minor typo (#7347) 2020-01-20 20:56:57 +02:00
fisker Cheung 278efbe104 Fix prefer-object-spread in src/document (#7353) 2020-01-19 00:57:54 +02: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
Georgii Dolzhykov 7e3c0c73b3 Merge branch 'master' into next 2020-01-14 20:36:21 +02:00
fisker Cheung c68d6e3c2b Move doc directory to document (#7272) 2020-01-14 13:58:42 +03:00