Commit Graph
34 Commits
Author SHA1 Message Date
fisker Cheung b72a37c51e Migrate internal ESLint rules to ESM (#17123) 2025-02-16 15:36:06 +08:00
fisker Cheung 76b8f95061 Rename parameters in massageAstNode (#16024) 2024-02-04 14:32:54 +08:00
fisker Cheung 6eda34db44 Test: Rename run_spec to runFormatTest (#15943) 2024-01-19 17:20:24 +08:00
fisker Cheung 134f6078e1 Add document/public.js to export public apis, remove internal utils (#14456) 2023-03-07 08:54:11 +08:00
fisker Cheung 4176837f75 Add prefer-create-type-check-function rule (#14071) 2022-12-29 17:17:19 +08:00
Sosuke Suzukiandfisker 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 9bacc75772 Use .at() and Object.hasOwn() (#13482) 2022-09-18 17:50:14 +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
fisker Cheung 33e621133c Remove prettier.doc.builders.concat (#13203) 2022-08-06 11:03:47 +08:00
Sosuke Suzuki 6c722c7990 [next]Enforce fs/promises (#13119)
* Add new ESLint rule `prefer-fs-promises`

* Apply rule

* Renaming
2022-07-17 16:02:22 +09:00
fisker Cheung 2bcee631a2 Refactor: Import document/*.js directly (#12739) 2022-04-29 14:04:17 +08:00
fisker Cheung 7290ff2dc7 Add internal ESLint rule no-legacy-format-test-fixtures (#12044) 2022-01-04 19:31:17 +08:00
fisker CheungandSosuke Suzuki 5f453482bc Add internal ESLint rule await-cli-tests (#12013)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2022-01-03 22:16:25 +08:00
fisker Cheung b001969b94 Remove require-json-extensions rule (#11233) 2021-07-22 09:32:21 +08:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
fisker Cheung 28e67a25ac Add no-conflicting-comment-check-flags rule (#10775) 2021-04-27 11:25:31 +08:00
fisker Cheung 230428f34b Add consistent-negative-index-access rule (#10569) 2021-03-20 14:06:12 +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 95c8086c2c Add flat-ast-path-call rule (#10354) 2021-02-26 09:26:50 +08:00
Georgii Dolzhykov f3906d84d4 Refactor: rename FastPath → AstPath (#10276) 2021-02-10 13:42:06 +02:00
Georgii Dolzhykov 5a33fec904 RFC: indentIfBreak (#10221) 2021-02-05 01:03:40 +02:00
Sosuke Suzukiandfisker Cheung 07b30645ec style: Add new ESLint rule no-empty-string-for-ifbreak (#10172)
* Add new ESLint rule for ifBreak

* Fix for third argument

* Run fix with new rule

* Address review

* Fix

* Update no-empty-flat-contents-for-if-break.js

* Fix CI config

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-01-29 20:03:11 +09: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 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 c7e354e38c Add isNonEmptyArray (#9902) 2020-12-17 14:46:59 +08:00
fisker Cheung 89402482ee Consistent Jsx case in variables (#9871) 2020-12-15 12:23:40 +08:00
fisker Cheung d8e40cd978 JS: Add hasComment and getComments (#9742) 2020-11-25 22:14:27 +08:00
fisker Cheung c7390d33b7 Refactor: Use locStart and locEnd directly from language-js/loc.js (#9576) 2020-11-04 08:52:02 +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 771a09dfee Refactor needs-parens.js (#9485) 2020-10-26 09:05:21 +08:00
fisker Cheung c6b3ed6e1c Enforce .json extensions (#8908) 2020-08-06 00:37:16 +08:00