fisker Cheung
b85bff8d1f
Remove printFunctionTypeParameters ( #18031 )
2025-10-10 21:20:07 +08:00
fisker Cheung
b289ecbb19
Remove support for tupleAndRecord ( #17363 )
2025-04-17 04:53:05 +08:00
fisker Cheung
1b4a63c114
Consistent print* function parameters order ( #10402 )
2025-04-09 11:07:46 +08:00
fisker Cheung
834786591f
Use JSDoc @import Tag ( #16706 )
2024-10-01 20:45:37 +09:00
Sam Zhou
ae8dcc48f5
Component syntax and related language features printing support ( #16191 )
...
* Component syntax and related language features printing support
Relevant Flow docs:
- https://flow.org/en/docs/react/component-syntax/
- https://flow.org/en/docs/react/render-types/
* Update issue number
* declare new test as unstable
* fix tests
2024-04-04 23:10:00 +09:00
fisker Cheung
9fb32a1a6b
Minor refactor to property print ( #15924 )
2024-02-03 20:50:44 +08:00
Alexander Kachkaev
1ea2fd059a
Add eslint-plugin-simple-import-sort ( #15817 )
2023-12-18 03:34:12 +08:00
fisker Cheung
6a6b699a42
Add isUnionType and isIntersectionType utilities ( #15814 )
2023-12-17 21:29:10 +08:00
fisker Cheung
12fd8891af
Update typescript-eslint to v6 ( #14429 )
2023-07-22 02:35:30 +08:00
Sosuke Suzuki
fa48415617
Bump Prettier dependency to 3.0.0
2023-07-05 21:50:05 +09:00
921eaf4690
Break on TypeScript parameter properties ( #14402 )
...
* add test for parameter properties
* break parameters for TypeScript parameter properties
ISSUE: #5666
* add a test pattern
* add changelog
* use getFunctionParameters
* Fix bad rebase
* Rename variables
* More tests
* Rename variable
* Fix snapshots
* Fix changelog
---------
Co-authored-by: fisker Cheung <lionkay@gmail.com >
Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com >
2023-03-12 00:06:39 +09:00
fisker Cheung
282a4019c7
Extract common/util.js to utils/ ( #14329 )
2023-02-13 10:17:39 +08:00
fisker Cheung
6b40e2e51e
Move comment attach/print code into main/comments/ ( #14327 )
2023-02-10 15:33:13 +08:00
fisker Cheung
c05723e7b0
Simplify getNextNonSpaceNonCommentCharacter ( #14318 )
2023-02-09 16:05:14 +08:00
fisker Cheung
29a7b3ed88
Refactor printDanglingComments ( #14288 )
2023-02-06 10:25:45 +08:00
fisker Cheung
468c514ba2
Fix inconsistent between array/tuple and object/record ( #14065 )
2023-01-04 15:07:07 +08:00
fisker Cheung
68a13957f4
Use optional chaining ( #13824 )
2022-11-14 19:43:08 +08:00
Sosuke Suzuki and fisker Cheung
92a6af22e7
Remove prefer-ast-path-node and add prefer-ast-path-getters ( #13648 )
...
* Support `getParent`
* Fix
* Fix
* Refactor
* Rename rule and add tests
* Fix by rule
* Fix error message
* Add error message tests
* Run Prettier!
* Address review
* Improve error message
* Refactor
* Stricter check & refactor
* Minor tweak
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-10-18 14:23:13 +09:00
fisker Cheung and Georgii Dolzhykov
f2c50456b8
Switch parse-srcset to npm published version ( #13536 )
...
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2022-09-27 16:02:47 +08:00
Sosuke Suzuki
e92dcbd1a5
Add new ESLint prefer-ast-path-node ( #13470 )
...
* Add new lint rule `prefer-path-get-value`
* Add new rule
* Apply fix
* Ingore projects in benchmark
* Add comment
2022-09-11 18:39:06 +09:00
Georgii Dolzhykov
f5610b8510
Hug object types in function parameters in Flow like in TS ( #13396 )
2022-08-30 17:38:50 +03:00
Georgii Dolzhykov
17081e6cf6
Support decorated function pattern ( #10714 )
2022-08-08 21:57:19 +03:00
fisker Cheung
cdb1494170
Revert "Switch print/embed to async ( #13104 )" ( #13210 )
2022-08-02 18:11:34 +08:00
fisker Cheung
8dae4abf41
Switch print/embed to async ( #13104 )
2022-07-17 16:10:06 +08:00
fisker Cheung
2bcee631a2
Refactor: Import document/*.js directly ( #12739 )
2022-04-29 14:04:17 +08:00
fisker Cheung
54835025d5
Migrate JS language to ES Module ( #12342 )
2022-02-21 15:53:02 +08:00
Sosuke Suzuki
d13feed42b
Reduce JS parsers bundle size ( #12156 )
...
* Extract utils
* utils.js -> utils/index.js
* Fix linter
2022-01-26 23:29:19 +09:00
fisker Cheung
894f841fbd
Style: Enforce extensions ( #11227 )
2021-07-21 09:10:34 +08:00
Georgii Dolzhykov and fisker Cheung
bc90973cad
Avoid arg expansion that leads to broken code ( #10712 )
...
* Avoid arg expansion that leads to broken code
* Preserve new lines and only take comments into account if they break lines
* Add robustness against path state corruption due to throwing
* Refactor
* Remove redundant logic
It solved the same issue but only partially.
* Simplify further
* Refactor path.try, fix callParent issue
* Minor refactoring
* Add istanbul ignore comment
* Add return to AstPath#try
Co-authored-by: fisker Cheung <lionkay@gmail.com >
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-04-20 15:02:11 +03:00
fisker Cheung and Georgii 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
Georgii Dolzhykov
ec27ade49b
Heuristic for grouping parameters in method signatures ( #10357 )
...
* Heuristic for grouping parameters in method signatures
* Apply the same logic to function declaration and Flow types
* Group only if there is only one parameter
* Don't group if type param has constraints/default or >1 type param
2021-02-23 16:38:56 +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 Cheung
d55d4e90d8
Add JS version isNextLineEmpty ( #9925 )
2020-12-18 10:14:14 +08:00
fisker Cheung
d8e40cd978
JS: Add hasComment and getComments ( #9742 )
2020-11-25 22:14:27 +08:00
fisker Cheung
6194e9825c
Refactor: Extract printFunctionParameters ( #9604 )
2020-11-05 23:09:08 +08:00