SUZUKI Sosuke
f852b8010e
Improve formatting for assignment its left can break ( #15547 )
2023-10-28 14:29:17 +09:00
renovate[bot] and fisker
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 Joshi and fisker 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 Casonato and fisker 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] and Sosuke 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 Rattray and Alex 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] and fisker 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 Cheung and SUZUKI 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
fisker Cheung
0d04d78367
Replace cosmiconfig with lilconfig ( #15232 )
2023-09-02 01:02:22 +08:00
Sosuke Suzuki
29f8861154
Bump Prettier dependency to 3.0.3
2023-08-29 21:31:25 +09:00
fisker Cheung
a35008fb0a
Support shared config that forbids require() ( #15233 )
2023-08-29 16:11:43 +08:00
SUZUKI Sosuke and fisker Cheung
1ce97d13a3
Support TypeScript 5.2 using / await using declaration ( #15321 )
...
* Update `@typescript-eslint` packages
* Install `typescript`
* Tweaks snapshot tests
* Tweaks error files
* Add tests for `using` with types
* Add changelog
* Update misc tests
* Update snapshots
* Revert misc tests and remove `typescript`
* Update changelog_unreleased/typescript/15321.md
Co-authored-by: fisker Cheung <lionkay@gmail.com >
* Fix file name typo
* Keep valid file
* Update tests
* Update changelog_unreleased/typescript/15321.md
Co-authored-by: fisker Cheung <lionkay@gmail.com >
* Remove non-existing filenames.
---------
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2023-08-29 15:51:50 +09:00
SUZUKI Sosuke
90fab608ae
Do not print trailing commas in arrow function type parameter lists in ts code blocks ( #15286 )
...
* Remove trailing comma for `ts` code blocks
* Add changelog
* Support `typescript`
* Update link
* Update tests
2023-08-24 17:02:56 +09:00
fisker Cheung
f75f717c4e
Allow break require() argument ( #15256 )
2023-08-23 15:58:06 +09:00
fisker Cheung
dc3ebe812f
Add test to close #14635 ( #15254 )
2023-08-23 15:57:07 +09:00
Sosuke Suzuki
73668b5973
Bump Prettier dependency to 3.0.2
2023-08-16 00:46:46 +09:00
SUZUKI Sosuke
1b0c756bd6
Print declare and export keywords for nested namespace ( #15249 )
2023-08-15 22:38:07 +09:00
auvred
8a3e73c6c0
Do not add trailing comma for grouped scss comments ( #15217 )
...
* Do not add trailing comma for grouped scss comments
* add changelog
2023-08-11 18:44:05 +09:00
Seiya
bf0b3040be
Break after equal on assignment if rhs is await/yield expression ( #15204 )
...
* add as-is test
* break after equal on assignment if rhs is wait
Discussion: #15196
* rename test file
* add as-is test
* treat YieldExpression
* add tests
* add changelog
* fix a bug
* add test for delegated yield
2023-08-06 13:02:40 +09:00
fisker Cheung
29854ca8da
Fix comments print in IfStatement ( #15076 )
2023-07-29 10:01:46 +08:00
fisker Cheung
12fd8891af
Update typescript-eslint to v6 ( #14429 )
2023-07-22 02:35:30 +08:00
renovate[bot] and fisker
e98083c84f
chore(deps): update dependency vnopts to v2 ( #15114 )
...
* chore(deps): update dependency vnopts to v2
* Update
* Update snapshot
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2023-07-22 01:49:00 +09:00
auvred
ceed405395
Add typing to support readonly array properties of AST Node ( #15127 )
...
* Add typing to support `readonly` array properties of AST Node
* add changelog
* fix changelog
* add test case
2023-07-22 01:43:26 +09:00