fisker Cheung
f79c8d56ac
Fix
2022-07-23 20:48:21 +08:00
fisker Cheung
c5ffd9130f
Merge branch 'main' into next
...
# Conflicts:
# src/document/doc-printer.js
2022-07-23 20:45:25 +08:00
Georgii Dolzhykov
ab72a2c11c
Refactor: simplify fits ( #13154 )
2022-07-23 20:15:50 +08:00
fisker Cheung
03416a153a
Throw errors for invalid doc ( #13149 )
2022-07-23 20:10:37 +08:00
fisker Cheung
73b8c86cc4
Merge branch 'main' into next
...
# Conflicts:
# scripts/tools/bundle-test/yarn.lock
2022-07-23 18:19:22 +08:00
fisker Cheung
8ee0c6354d
Fix ifBreak check in fits ( #12362 )
2022-07-23 18:02:05 +08:00
fisker Cheung
cf92f9ba4f
Fix a TODO, use Symbol#description ( #13139 )
2022-07-21 10:15:45 +08:00
fisker Cheung
ff98159873
Use named export in doc.js ( #12789 )
2022-05-07 01:37:40 +08:00
fisker Cheung
2bcee631a2
Refactor: Import document/*.js directly ( #12739 )
2022-04-29 14:04:17 +08:00
fisker Cheung
af103ae766
Migrate src/{document,utils}/** to ES Modules ( #12345 )
2022-02-28 11:12:37 +08:00
fisker Cheung
05aa5e16d6
Migrate src/{main,common,config}/** to ES Modules ( #12344 )
2022-02-23 20:16:30 +08:00
fisker Cheung
56791a2624
Migrate src/*.js to ES Module ( #12278 )
2022-02-17 09:47:35 +08:00
Sosuke Suzuki
bb130d2d6e
Extract getStringWidth ( #12173 )
2022-01-27 19:24:11 +09:00
Georgii Dolzhykov and sosukesuzuki
11e43e2e17
Avoid extra offset in arrow function body when using long types (alternative solution) ( #11515 )
...
* Avoid extra offset in arrow function body when using long types
* Rename var
* Handle object types properly
* Refactor, add test
* Don't try to keep arrow signatures on one line
Regression testing showed that this was a bad idea in this case
* Add changelog
* Break lhs if it's breakable and rhs is arrow fn
* Reuse isArrowFunctionVariableDeclarator
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-11-17 16:24:16 +09:00
fisker Cheung
e96dc509ec
Update eslint config ( #11595 )
2021-09-28 11:16:39 +08:00
Sosuke Suzuki
9dcfd16e6a
Use ts-expect-error instead of ts-ignore ( #11330 )
2021-08-09 00:00:22 +09:00
fisker Cheung
5f0ee39fa0
Added replaceEndOfLine and replaceTextEndOfLine ( #10913 )
2021-07-21 10:02:33 +08:00
fisker Cheung
894f841fbd
Style: Enforce extensions ( #11227 )
2021-07-21 09:10:34 +08:00
fisker Cheung
085e38bffb
Move replaceEndOfLineWith to docUtils ( #10862 )
2021-05-17 20:10:44 +03:00
fisker Cheung
213a825131
Use join in replaceNewlinesWithLiterallines ( #10860 )
2021-05-16 12:40:00 +08:00
fisker Cheung
383f622942
Style: Remove useless flags ( #10861 )
2021-05-15 14:37:17 +03:00
Georgii Dolzhykov
ae176f2e79
Process conditional groups in mapDoc ( #10695 )
2021-04-12 18:15:46 +03:00
fisker Cheung
230428f34b
Add consistent-negative-index-access rule ( #10569 )
2021-03-20 14:06:12 +02:00
fisker Cheung
d3a0699148
Rename n to node ( #10504 )
2021-03-10 22:14:08 +02:00
Georgii Dolzhykov
4a8fe3bc3c
Fix --debug-print-doc ( #10445 )
2021-02-28 20:52:57 +02:00
fisker Cheung
9c6de24405
Style: Disallow == ( #10338 )
2021-02-21 02:44:16 +02:00
Georgii Dolzhykov
0a647a0d31
Format assignments more consistently ( #10222 )
2021-02-16 21:25:11 +02:00
fisker Cheung
c3d08c943e
Style: Disallow else if in no-else-return ( #10310 )
2021-02-15 05:29:58 +02:00
fisker Cheung
bc30016500
Remove isLineNext ( #10304 )
...
* Replace `isLineNext` with `isLineOrHardlineOrSoftline`
* Remove `isLineNext`
* Use `isEmptyStringOrAnyLine`
* Update condition
2021-02-11 23:06:47 +02:00
fisker Cheung
36d3a0c784
Remove isEmpty ( #10295 )
2021-02-11 04:36:10 +02:00
Georgii Dolzhykov
662cdb04db
RFC: label doc ( #10275 )
...
* RFC: label doc
* Update functions in doc-utils
2021-02-10 17:08:54 +02:00
fisker Cheung
ba3930d63e
Replace concat in src/document/ with array ( #10185 )
2021-02-08 09:48:25 +08:00
Georgii Dolzhykov
0b5f259c08
Another minor fix in doc-debug
2021-02-06 14:41:02 +02:00
fisker Cheung
819cc01bfb
Safer check before passing to fill ( #10235 )
2021-02-05 09:24:44 +08:00
Georgii Dolzhykov
5a33fec904
RFC: indentIfBreak ( #10221 )
2021-02-05 01:03:40 +02:00
Georgii Dolzhykov
575be32c05
Minor fixes in doc-debug
2021-02-04 13:42:47 +02:00
fisker Cheung
f04b2b991c
Enable no-implicit-coercion rule ( #10186 )
2021-02-01 13:14:04 +08:00
Georgii Dolzhykov
56840d4890
Followup for #10169 : minor tweaks ( #10177 )
...
* Followup for #10169 : minor tweaks
* Add Copy doc button to Playground
2021-01-30 18:25:43 +02:00
Georgii Dolzhykov
78b38d2282
Round-trippable --debug-print-doc ( #10169 )
2021-01-29 21:48:34 +02:00
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 Cheung and Georgii 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 Cheung and Georgii 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 Cheung and Georgii 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