fisker Cheung
811b591ee8
Update dependency jest-docblock to v28.1.1 ( #13054 )
2022-07-11 10:03:49 +08:00
Or Rosenblatt
a00d31e1a4
Support .lintstagedrc ( #13081 )
...
* Test `.lintstagedrc` JSON and YML formatting (TDD)
* Support `.lintstagedrc` formatting
* Update spell checking for `.lintstagedrc`
* Update changelog
* Update changelog
2022-07-09 13:30:26 +09:00
fisker Cheung
a043ac0d73
Update dependency @typescript-eslint/typescript-estree to v5.30.0 ( #13053 )
2022-06-28 14:22:10 +08:00
Huáng Jùnliàng
9dd761a6e4
fix: JSON modules disable named exports ( #13035 )
2022-06-23 02:05:46 +08:00
Huáng Jùnliàng
b0201e01ef
fix: JSON modules disable named exports ( #13031 )
2022-06-21 10:56:00 +08:00
chimurai and fisker Cheung
794d9d1558
bugfix(graphql): Keep useful empty lines in description ( #13013 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-06-16 13:33:09 +08:00
fisker Cheung
d2bcaea121
Throw errors for invalid TSEmptyBodyFunctionExpression node ( #12982 )
2022-06-14 12:33:44 +08:00
Sosuke Suzuki
2316e2fecd
Update linguist-language ( #12994 )
...
* Install new `linguist-language`
* Remove `.mts` and `.cts`
* Update tests
2022-06-12 01:55:11 +09:00
Sosuke Suzuki and Simon Lydell
fdccc0f48e
Add --cache CLI option ( #12800 )
...
* Install `file-entry-cache` and types
* Implement `FormatResultsCache`
* Add `--cache` and `--cache-location` option
* Implement `--cache` and `--cache-location`
* Add tests for `--cache`
* Add tests for `--cache-location`
* Avoid spellcheck error
* Update snapshots for new options
* Add `groupBy` for website
* Use `fs.promises` instead of `fs/promises`
* Use `rimraf` instead of `fs.rm`
* Fix properties order of `options`
* Install `find-cache-dir` and types
* Change default cache file location to `node_modules/.cache/prettier`
* Fix tests following to change default cache file location
* Update snapshots for changing default cache file location
* Set `os.tmpdir()` as a fallback for default cache dir
* Add docs for `--cache` and `--cache-location`
* Use `sdbm` instead of `node:crypto`
* Add changelog
* Fix `getHashOfOptions`
* Remove `cache-location`
* `prettiercache` -> `prettier-cache`
* Remove cache file when run Prettier without `--cache` option
* Implement `--cache-strategy`
* Add tests for invalid cache strategy
* Fix lint problems
* Tweaks tests
* Add tests for timestamp
* Add tests for `--cache-strategy`
* Add docs for cache-strategy
* Address review
* Fix `findCacheFile`
* Use Set.prototype.has
* Throw error with --stdin-filepath
* Update snapshots
* Fix error for cache and stdin
* Use string constructor instead of toString
* Update changelog
* Use flag validation
* Fix `cache-strategy` definition
* Update docs
* Mark highlihgt
* Throw error for `--cache-strategy` without `--cache`
* Update docs
* Fix typo
* Updates snapshots
* Update docs/cli.md
Co-authored-by: Simon Lydell <simon.lydell@gmail.com >
* Fix error message
* Remove `:::` syntax
* Defaults `content`
* Update docs
* Fix by Prettier
Co-authored-by: Simon Lydell <simon.lydell@gmail.com >
2022-06-11 23:32:32 +09:00
Sosuke Suzuki
97bab8f984
Update angular-estree-parser ( #12993 )
...
* Update `angular-estree-parser`
* Add tests
* Add changelog
2022-06-11 20:08:46 +09:00
Sosuke Suzuki
7f9a08762d
Update dependency flow-parser to v0.180.0 ( #12990 )
...
* Update `flow-parser`
* Update snapshots
2022-06-11 00:06:22 +09:00
Sosuke Suzuki
be9d63e543
Avoid printing attribute per line in Vue SFC blocks ( #12895 )
...
* Avoid print single attribute perline for Vue SFC blocks
* Add tests
* Add changelog
* Fix typo
* Add more tests
2022-06-04 23:25:27 +09:00
Sosuke Suzuki
a808df643d
Update @typescript-eslint/typescript-estree to 5.27.0 and move tests ( #12959 )
...
* Install latest typescript-estree
* Move tests for type parameter of typeof
* Update changelog
2022-06-01 06:47:51 +09:00
Sosuke Suzuki
9c11aa141a
Add tests for TS 4.7 features ( #12924 )
...
* Add tests for instantiation expressions
* Add tests for infer extends
* Add tests for optional variance
* Update changelog
2022-05-28 03:37:30 +09:00
HosokawaR
a089819223
fix formatting for typescript Enum with computed members ( #12930 )
...
* fix formatting for typescript Enum with computed members
* add change log
* remove extra examples in change log
2022-05-27 20:44:17 +09:00
Sosuke Suzuki
3147244f55
Update dependencies to support TypeScript 4.7 ( #12921 )
...
* Update `@typescript-eslint/typescript-estree` to 5.26.0
* Update `typescript` to `4.7.1-rc`
* Fix syntax kind
* Add `jsdoc_only_types.ts` to unstable tests
* Make printing jsdoc type stable
* Update typescript
2022-05-27 01:46:31 +09:00
Sosuke Suzuki
2fc6e5dd4f
Support TS 4.7 optional variance ( #12900 )
...
* Print `in` and `out`
* Add tests
* Add tests for jsx
2022-05-22 03:33:05 +09:00
Sosuke Suzuki
1eecc85985
Support TS 4.7 instantiation expression ( #12898 )
...
* Handle `TSInstantiationExpression`
* Print `typeParameters` for `TSTypeQuery`
* Add tests
* Add more tests
2022-05-22 03:30:47 +09:00
Sosuke Suzuki
bc6539c15c
Add tests for extends constraints for infer ( #12897 )
2022-05-22 03:28:47 +09:00
Sosuke Suzuki
36c20c51bc
Support Speculation Rules API formatting in HTML ( #12882 )
...
* Add script formatting for `speculationrules`
* Fix lint problems
2022-05-17 10:38:46 +09:00
Jed Fox
de16657ba0
Remove all references to Gitter ( #12885 )
2022-05-16 11:08:44 -04:00
HosokawaR
765d78305f
Fix exports comment formats. ( #12860 )
...
* fix exports comment formats
* add tests
* add change log
* rename function name
* merge logic
* add tests to compare comment formats in `export` and `import`
2022-05-15 22:39:55 +09:00
HosokawaR and fisker Cheung
7ab6198453
Make more callee patterns recognized as "test call callee". ( #12779 )
...
* make more pattern recognized as test call callee
* add tests
* add change log
* make collate logic easier to read.
* add typedef
* remove extra processing
* fix filename mistake is-noded-matches.js -> is-node-matches.js
* add correct words to cspell config
* add a comment about copying
* move patterns outside
* Minor tweak
* rename valiable name
* Adding changelog real-world use case
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-05-07 16:44:56 +09:00
053022f5ed
Infer Stylus parser in Vue SFC ( #12707 )
...
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-05-01 23:01:24 +08:00
Sosuke Suzuki
fe6820e815
Try to fix pnpm error on Dev Package Tests ( #12774 )
...
* Remove `-y` from `pnpm init`
* Change
2022-05-01 11:49:15 +09:00
Sosuke Suzuki
504d751036
Preserve blank line between export specifiers ( #12746 )
...
* Preserve blank line between export specifiers
* Add changelog
* rename
2022-04-29 17:42:42 +09:00
fisker Cheung
fc74af1d94
Set loglevel to debug automatically when performance flags found ( #12698 )
2022-04-28 11:24:59 +08:00
HosokawaR and fisker Cheung
9fbdcda5b1
Print as instead of : for babel-ts parser ( #12706 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-27 17:56:38 +08:00
fisker Cheung
d1332b4c63
Set printBasicPrototype: false in snapshots ( #12702 )
2022-04-27 17:56:05 +08:00
fisker Cheung
85e6e4f73f
CLI: Skip print code or write file when performance flags found ( #12682 )
2022-04-25 08:44:22 +08:00
29c4a3e559
bugfix(graphql): Fix single line and empty description formatting ( #12608 )
...
Co-authored-by: Harry Hopkinson <63599884+Harry-Hopkinson@users.noreply.github.com >
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-22 20:38:44 +08:00
Sosuke Suzuki
a4cba80dc0
Allow formatting for Vue template expression written in TypeScript ( #12584 )
...
* Support TS expression in vue SFC
* Add changelog
* Add `__ts_expression`
* Add `__vue_ts_expression`
* Add tests
* Do not use `ast.walk`
* Address review
* Add `__vue_ts_event_binding`
* Fix
2022-04-17 13:12:19 +09:00
Sosuke Suzuki and fisker Cheung
fa3b95c2e1
Remove lodash ( #12628 )
...
* Replace `groupBy`
* Replace `partition`
* Replace `pick`
* Move `partition`
* Replace `uniqBy`
* Replace `fromPairs`
* Remove usage from website
* Reuse `partition`
* Remove from package.json
* Fix
* Use `ignore.default`
* Add `resolveConfig` to `FileInfoOptions`
* Explicit tuple types
* Make `cache` optional
* Fix cosmiconfig type
* Use `@ts-expect-error` for private property access
* Add type annotation for validate
* Fix type errors for `OptionInfo`
* Add `@ts-expect-error`
* Fix type of `normalizeOptions`
* Fix `OptionInfo` type
* Add `@ts-expect-error` for `option-normalizer`
* Avoid type error
* Fix typo
* Add types for lodash fns
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-10 15:26:07 +09:00
Simen Bekkhus
033ac94f25
chore: disable string escaping in snapshots ( #12612 )
2022-04-08 09:59:17 +09:00
Harry Hopkinson and fisker Cheung
f98c197b66
Print the number of files that need formatting. ( #12561 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-07 09:47:13 +08:00
fisker Cheung
3fd64b4f30
Format .importmap file with json-stringify parser ( #12603 )
2022-04-07 09:37:30 +08:00
dependabot[bot]
f4d4dc1177
Build(deps): Bump strip-ansi from 6.0.0 to 7.0.0 ( #10731 )
2022-04-02 11:24:18 +00:00
dependabot[bot] and fisker Cheung
b1e96cde95
Build(deps): Bump meriyah from 4.2.0 to 4.2.1 ( #12567 )
...
* Build(deps): Bump meriyah from 4.2.0 to 4.2.1
Bumps [meriyah](https://github.com/meriyah/meriyah ) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/meriyah/meriyah/releases )
- [Changelog](https://github.com/meriyah/meriyah/blob/master/CHANGELOG.md )
- [Commits](https://github.com/meriyah/meriyah/compare/v4.2.0...v4.2.1 )
---
updated-dependencies:
- dependency-name: meriyah
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Add test for https://github.com/meriyah/meriyah/commit/6de707a0efb3053767deaa36b1ed6979b0d3f873
* Test https://github.com/meriyah/meriyah/commit/37c63613771e5bc6e23b7da2d92e992c60dafc5a
* Test https://github.com/meriyah/meriyah/commit/d757c6b20ae4f6f4e55a77179726db36cf2bd50b
* Add changelog
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-02 20:13:21 +09:00
fisker Cheung
afd0220dea
Move some bundle test code into tests/ ( #12577 )
2022-04-02 16:14:32 +08:00
fisker Cheung
4b73b7e8ab
Refactor format test to async ( #12559 )
2022-04-01 10:21:44 +08:00
fisker Cheung
b429cee273
Fix less/scss format error ( #12536 )
2022-03-29 20:44:28 +08:00
Trevor Scheer and fisker Cheung
570c3180b9
[graphql] Add support for printing SchemaExtension nodes ( #12519 )
...
* Add support for printing SchemaExtension nodes
* Add changelog entry
* Lint
* Update 12519.md
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-03-27 00:59:04 +09:00
Sosuke Suzuki
becb6c9b74
Fix non-idempotent formatting of function calls with complex type arguments ( #12508 )
...
* Fix
* Add TS tests
* Add Flow tests
* Add changelog
2022-03-23 23:09:58 +09:00
fisker Cheung
5ef82125a9
CLI: Don't use logger to print information ( #12477 )
2022-03-21 10:38:48 +08:00
fisker Cheung
ef3fe51380
Fix pluginSearchDirs schema ( #12474 )
...
* Fix `pluginSearchDirs` schema
* `anyOf` -> `oneOf`
* Fix test
2022-03-20 14:50:27 +09:00
dependabot[bot]
425255cc5b
Build(deps): Bump @babel/parser from 7.17.3 to 7.17.7 ( #12460 )
2022-03-20 04:46:45 +00:00
fisker Cheung
ae080df3e7
Enable unicorn/template-indent rule ( #12469 )
2022-03-17 20:13:28 +08:00
fisker Cheung
935d76780a
Prevent plugin search on format test ( #12322 )
2022-03-15 09:44:37 +08:00
fisker Cheung
4b7a39c936
Update chalk to v5 ( #12446 )
2022-03-15 09:40:25 +08:00
fisker Cheung
5a50a0d909
Bundle bin and cli separately ( #12306 )
2022-03-13 22:47:02 +08:00