44 Commits
Author SHA1 Message Date
fisker Cheung 8ff2c345eb Update internal ESLint rule (#18766) 2026-01-27 22:19:28 +08:00
fisker Cheung 56860a7c58 Refactor massageAst releated code (#18733) 2026-01-24 11:06:44 +08:00
fisker Cheung 1f6ba74b87 Extract shouldAddParenthesesToIdentifier (#18432) 2025-12-06 17:46:42 +08:00
fisker Cheung e5118b2650 Convert node types Set to type check function (#18149) 2025-10-30 02:15:32 +08:00
fisker Cheung aba13a2e36 Forbid use 2nd and 3rd parameter in AstPath callbacks (#18039) 2025-10-11 02:15:49 +08:00
fisker Cheungandautofix-ci[bot] 858ace6ffa Forbid rename path in callbacks (#18038)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-11 01:46:03 +08:00
fisker Cheung 1b4a63c114 Consistent print* function parameters order (#10402) 2025-04-09 11:07:46 +08:00
fisker Cheung b72a37c51e Migrate internal ESLint rules to ESM (#17123) 2025-02-16 15:36:06 +08:00
fisker Cheung 47fc261aad Remove eslint-plugin-import (#16697) 2024-09-27 20:49:39 +08:00
fisker Cheung a80380f57c Fix test for internal eslint rules (#16378) 2024-06-11 10:48:37 +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
renovate[bot]andfisker Cheung 825425c57f chore(deps): update dependency eslint-plugin-import to v2.28.0 (#15184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-07-31 13:14:25 +08:00
Sosuke Suzuki fa48415617 Bump Prettier dependency to 3.0.0 2023-07-05 21:50:05 +09:00
fisker Cheung fb948bb15f Integration test: Rename runPrettier to runCli (#14687) 2023-04-11 08:44:23 +08:00
fisker Cheung b5210fd392 Improve internal eslint rule (#14479) 2023-03-10 15:01:30 +08:00
fisker Cheung 52140cc6ad Improve internal ESLint rule (#14112) 2023-01-11 11:22:44 +08:00
fisker Cheung f5fc865953 Forbid AstPath.getName() (#14106) 2023-01-10 11:11:39 +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
fisker Cheung be5f457498 Use AstPath getters in needs-parens.js (#13476) 2022-09-14 14:09:10 +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 f0b63f3dff Merge branch 'main' into next
# Conflicts:
#	CONTRIBUTING.md
#	cspell.json
#	docs/options.md
#	package.json
#	scripts/build/bundler.mjs
#	src/language-css/loc.js
#	src/language-css/parser-postcss.js
#	src/language-css/utils/index.js
#	tests/format/js/arrows-bind/jsfmt.spec.js
#	tests/format/js/async-do-expressions/jsfmt.spec.js
#	tests/format/js/bind-expressions/jsfmt.spec.js
#	tests/format/js/classes/top-level-super/jsfmt.spec.js
#	tests/format/js/comments-pipeline-own-line/jsfmt.spec.js
#	tests/format/js/decorator-comments/jsfmt.spec.js
#	tests/format/js/decorators-export/jsfmt.spec.js
#	tests/format/js/decorators/jsfmt.spec.js
#	tests/format/js/do/jsfmt.spec.js
#	tests/format/js/export-default/escaped/jsfmt.spec.js
#	tests/format/js/export-extension/jsfmt.spec.js
#	tests/format/js/export-star/jsfmt.spec.js
#	tests/format/js/exports/jsfmt.spec.js
#	tests/format/js/invalid-code/jsfmt.spec.js
#	tests/format/js/logical-assignment/jsfmt.spec.js
#	tests/format/js/multiparser-invalid/jsfmt.spec.js
#	tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js
#	tests/format/js/object-property-comment/jsfmt.spec.js
#	tests/format/js/partial-application/jsfmt.spec.js
#	tests/format/js/pipeline-operator/jsfmt.spec.js
#	tests/format/js/private-in/jsfmt.spec.js
#	tests/format/js/record/jsfmt.spec.js
#	tests/format/js/reserved-word/jsfmt.spec.js
#	tests/format/js/strings/jsfmt.spec.js
#	tests/format/js/throw_expressions/jsfmt.spec.js
#	tests/format/js/trailing-whitespace/jsfmt.spec.js
#	tests/format/js/v8_intrinsic/jsfmt.spec.js
#	tests/format/misc/errors/js/literal/jsfmt.spec.js
#	tests/format/misc/errors/js/object/jsfmt.spec.js
#	tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js
#	tests/integration/__tests__/bundle.js
#	tsconfig.json
#	yarn.lock
2022-02-09 09:22:32 +08:00
fisker Cheung 7e73f1cf0d Update cSpell config (#12154) 2022-01-27 15:03:49 +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
Georgii Dolzhykov 3d8dc612b5 Bump Prettier dependency to 2.3.0 2021-05-10 00:07:47 +03: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 c55f899b32 Test internal eslint rules (#9929) 2020-12-24 19:44:17 +08:00