Commit Graph
2680 Commits
Author SHA1 Message Date
Arnaud 457e83a725 docs: update the JSON schema location to use https (#15674) 2023-11-18 15:51:29 +09:00
fisker Cheung 1b21096744 Make findProjectRoot async (#15672) 2023-11-17 21:44:39 +08:00
fisker ba258537e3 Improve coverage 2023-11-17 01:46:48 +08:00
fisker b5313a5a5a Improve coverage 2023-11-17 01:39:55 +08:00
fisker Cheung e4a74c05f4 Fix argument passed to lilconfig.search() (#15363) 2023-11-16 01:05:57 +08:00
Pierre-Marie Dartus a8bf66ae63 Remove unused findParentDir (#15651)
Drop unused  dependency
2023-11-13 15:29:33 +08:00
Sosuke Suzuki eebf0e4b5e Bump Prettier dependency to 3.1.0 2023-11-13 12:00:57 +09:00
fisker Cheung ff57f5064d Fix @for angularControlFlowBlock (#15620) 2023-11-12 23:56:56 +08:00
fisker Cheung c433415d42 Fix formatting of "angularControlFlowBlock" in span (#15615) 2023-11-12 22:36:43 +08:00
fisker Cheung bb68fec819 Snapshot display values for html elements (#15616) 2023-11-12 22:24:05 +08:00
fisker Cheung 22c423933c Refactor angular control flow block (#15614) 2023-11-12 22:15:30 +08:00
0176a33db4 Support angular control flow (#15606)
Co-authored-by: dweizhe <d.weizhe@anyong.com.tw>
Co-authored-by: fisker <lionkay@gmail.com>
2023-11-12 20:01:30 +08:00
fisker Cheung 1a00467677 Fix error when formatting file names contains square brackets or dots (#15597) 2023-11-07 10:25:24 +08:00
fisker Cheung 36d1b8b09d Fix babel error message (#15581) 2023-11-03 19:35:55 +08:00
SUZUKI Sosuke 1d45bce625 Consistently format strings containing escapes (#15525) 2023-10-29 21:52:38 +09:00
SUZUKI Sosuke f852b8010e Improve formatting for assignment its left can break (#15547) 2023-10-28 14:29:17 +09:00
renovate[bot]andfisker ba6512a88f chore(deps): update dependency linguist-languages to v7.27.0 (#15557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-10-28 02:40:42 +08:00
Seiya c609058fd3 Support (type) satisfies never; (#15514) 2023-10-16 16:04:28 +09:00
4aa5fd1c79 New Ternary Formatting: A Curious Case of the Ternaries (#13183)
Co-authored-by: Alex Rattray <rattrayalex@stripe.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2023-10-09 10:44:30 +09:00
SUZUKI Sosuke 4b432496df Support deferred import evaluation and source phase import syntax (#15487) 2023-10-09 08:52:48 +09:00
ADTC 7e67e43061 Show (unchanged) keyword for accessibility in CLI --write (#15467) 2023-10-09 08:40:28 +09:00
SUZUKI Sosuke edfe46051f Support optional chaining assignment (#15488) 2023-10-09 08:36:11 +09:00
SUZUKI Sosuke 14ddf452c4 Update @babel/parser to 7.23.0 (#15485) 2023-10-08 22:26:13 +08:00
Vivek Joshiandfisker Cheung d4d4b185e0 Fix: Encoding < and > in markdown urls (#15400)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-10-02 18:00:02 +08:00
Lucas Santos f4491b1274 Fix name case of selectors in styled components interpolation (#15472) 2023-09-30 15:57:53 +09:00
Luca Casonatoandfisker Cheung b78d7c7d2d Disambiguate unary expr in instanceof and in (#15468)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-09-28 14:56:55 +08:00
SUZUKI Sosuke fa8cb85434 Support type arguments after typeof (#15466) 2023-09-28 12:57:38 +09:00
renovate[bot]andSosuke Suzuki 772c7b6305 chore(deps): update dependency hermes-parser to v0.16.0 (#15456)
* chore(deps): update dependency hermes-parser to v0.16.0

* Update snapshot

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2023-09-25 14:48:21 +09:00
SUZUKI Sosuke 9f06cdd5b0 Process files only supported by plugins (#15433) 2023-09-25 14:45:01 +09:00
Alex RattrayandAlex Rattray f25a592f57 Add indentation back to nested ternaries (#9559)
* Add indentation back to nested ternaries (except JSX)

* Add a real-world test case

* Add changelog entry

---------

Co-authored-by: Alex Rattray <rattrayalex@stripe.com>
2023-09-24 15:13:00 -04:00
Tatsunori Uchino 0661f78a26 Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK (#15411)
* Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK

* Add changelog
2023-09-22 22:30:30 +09:00
Sam Zhou 6bff776efd Support type arguments on jsx opening elements for flow (#15429) 2023-09-20 00:35:18 +09:00
SUZUKI Sosuke 4169dbb871 Fix printing comment for the last operand of union types (#15409) 2023-09-16 21:52:02 +09:00
SUZUKI Sosuke c041f3fb4f Support embedded formatting in template literals annotated with as const (#15408) 2023-09-16 21:42:17 +09:00
George Zahariev 675490ae55 Support as and satisfies expressions for Flow (#15130) 2023-09-16 17:28:18 +09:00
Joseph Frazier 825dbe3daa cleanup EditorConfig handling: Remove unused parsing/ignoring of insert_final_newline to insertFinalNewline (#15398)
EditorConfig handling: Remove parsing/ignoring of `insert_final_newline` to `insertFinalNewline`

Now that https://github.com/prettier/prettier/pull/15394 has been
merged, this addresses https://github.com/prettier/prettier/issues/14514#issuecomment-1471056464
2023-09-14 12:45:11 -04:00
fisker Cheung 6c833b4445 Support URL as ignorePath in getFileInfo() (#15364) 2023-09-14 20:10:10 +08:00
Joseph Frazier ae6f9ac25b Move editorconfig-to-prettier package into repo (#15394)
I'd like to vendor/upstream this code because it's been the topic of a handful of issues in its repo over the years, including https://github.com/josephfrazier/editorconfig-to-prettier/issues/9, https://github.com/josephfrazier/editorconfig-to-prettier/issues/21, and most recently https://github.com/josephfrazier/editorconfig-to-prettier/issues/24, and I feel that having it in-repo would be more appropriate (not to mention [the issues in _this_ repo that pertain to editorconfig parsing](https://github.com/search?q=repo%3Aprettier%2Fprettier+editorconfig++&type=issues&state=open)). I've elaborated on my thoughts in https://github.com/josephfrazier/editorconfig-to-prettier/issues/24#issuecomment-1718405985, which I'll quote below:

> hey @Drakmyth, thanks for continuing this conversation! I appreciate all the links you've provided that indicate existing intention and implementations of parsing non-standard/custom properties. It seems like this question might not be as simple as I thought it was previously.
> 
> @fisker, thanks for chiming in as well!
> 
> As you (@fisker) mentioned in [#16 (comment)](https://github.com/josephfrazier/editorconfig-to-prettier/pull/16#issuecomment-1486130040), this package was originally intended for use by Prettier, and while there are some other dependents (according to [github](https://github.com/josephfrazier/editorconfig-to-prettier/network/dependents?dependent_type=PACKAGE) and [npm](https://www.npmjs.com/package/editorconfig-to-prettier?activeTab=dependents)), Prettier is still the vast majority of the usage this package sees.
> 
> Given that, I think it might make sense for this package's code/functionality to move into the Prettier repository, so that any issues relating to it can be discussed where it's used. Personally, I don't use `.editorconfig` with Prettier, so I don't feel especially well-positioned to make decisions on how things should work, especially when [the output of this package is subsequently modified by Prettier](https://github.com/prettier/prettier/blob/7c512651f8814924a042034ff821190c68ef409d/src/config/resolve-editorconfig.js#L13-L16) (I think you had also [mentioned](https://github.com/prettier/prettier/issues/14514#issuecomment-1471056464) this previously, @fisker), indicating that its behavior is already divergent from the intended use case.
> 
> What do y'all think of that proposal? If we have https://github.com/prettier/prettier/ vendor this repository's code, then I can archive this repo and direct people to discuss functionality in the Prettier issues.

This also implements @fisker's suggested change to ES module syntax from https://github.com/josephfrazier/editorconfig-to-prettier/pull/16/, as it's required for lint/test etc to pass.

Once this is merged, I'll likely archive the https://github.com/josephfrazier/editorconfig-to-prettier/ repo after adding a note directing any visitors here instead.

---

* Vendor editorconfig-to-prettier.js from https://github.com/josephfrazier/editorconfig-to-prettier/blob/8bb8226c40d7f2c8cf629301576850876c8617d4/index.js

* WIP Use `require` instead of `import`

* Revert "WIP Use `require` instead of `import`"

This reverts commit 4656b727960822b3d9d0659b68c99d8fa9a9ba58.

* Use `export` in editorconfig-to-prettier.js instead of `module.exports`, see https://github.com/josephfrazier/editorconfig-to-prettier/pull/16/

Copied from https://raw.githubusercontent.com/josephfrazier/editorconfig-to-prettier/e245d7051f3e2a1153b82362ed241f3f7482ab18/index.js

* `yarn fix`

* Add tests/unit/editorconfig-to-prettier.js from https://github.com/josephfrazier/editorconfig-to-prettier/pull/16/

Copied from https://raw.githubusercontent.com/josephfrazier/editorconfig-to-prettier/9effd580e7b6722007e1ace9913512e450cda46f/test.js

* tests/unit/editorconfig-to-prettier.js: Fix path to implementation

* WIP Naively convert assert.deepEqual to expect/toStrictEqual, see https://github.com/prettier/prettier/pull/15394#issuecomment-1718623556

* Wrap `test()` around `expect` calls

* XXX Force a middle test to fail to ensure the syntax works

* Revert "XXX Force a middle test to fail to ensure the syntax works"

This reverts commit 947eb34e1175944ebebf0a6271e13af99adcd663.

* `yarn fix`
2023-09-14 07:31:45 -04:00
fisker Cheung bf7d90ae84 Switch html-styles to html-ua-styles (#15334) 2023-09-14 09:45:15 +08:00
auvred 7c512651f8 Do not split call of scss function with leading dash (#15370)
* Do not split call of scss function with leading dash

* add changelog

* apply check only for scss parser

* Revert "apply check only for scss parser"

This reverts commit 378bf1ac11830ff22c922efbd10c322ed573a31e.

* add more test cases

* use test case from original issue
2023-09-13 21:46:22 +09:00
renovate[bot]andfisker Cheung 4eaf68cd6c chore(deps): update dependency @babel/parser to v7.22.16 (#15380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-09-12 19:18:02 +08:00
fisker Cheung 98ae581402 Minor tweak to CLI (#15366) 2023-09-07 16:32:43 +08:00
fisker Cheung b9a3995e3a Refactor: Accept URL in isIgnored and inferParser (#15361) 2023-09-07 09:27:39 +08:00
fisker Cheung b2c33a4cec Accept URL in getFileInfo (#15360) 2023-09-06 15:49:22 +08:00
fisker Cheung 7e45a92707 Accept URL in resolveConfig (#15354) 2023-09-06 14:54:36 +08:00
fisker CheungandSUZUKI Sosuke 56752e00e5 Accept URL in resolveConfigFile (#15332)
Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2023-09-04 19:59:42 +08:00
fisker Cheung 37139afeaa Meta tweak (#15331) 2023-09-04 19:54:16 +08:00
fisker Cheung 411ef345a2 Fix comment between parentheses and function body (#15326) 2023-09-02 09:18:15 +08:00
fisker Cheung 958b355ccb Fix comment around TSParameterProperty (#15324) 2023-09-02 09:16:36 +08:00
fisker Cheung 7c7ab7f7a2 Fix --stdin-file-path (#15328) 2023-09-02 09:15:48 +08:00