Fix English grammer in changelog_unreleased (#17635)
This commit is contained in:
1 parent
84ee9016ba
commit
0ef2086cc9
15 files changed
+20
-20
No files matched your search
@@ -15,7 +15,7 @@
|
||||
{{ void(1 + 2) }}
|
||||
|
||||
// Prettier stable
|
||||
The new syntax not corretly recognized.
|
||||
The new syntax is not correctly recognized.
|
||||
|
||||
// Prettier main
|
||||
{{ a in b }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Accept `URL` in `plugins` option (#17166 by @fisker)
|
||||
|
||||
`plugins` option now accepts [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or url string starts with `file:` in all public APIs.
|
||||
`plugins` option now accepts [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string that starts with `file:` in all public APIs.
|
||||
|
||||
```js
|
||||
// `URL`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Accept `URL` as custom config file in `resolveConfig` (#17167 by @fisker)
|
||||
|
||||
[`prettier.resolveConfig()`](https://prettier.io/docs/api#prettierresolveconfigfileurlorpath--options) now accepts an [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string starts with `file:` as custom config file location.
|
||||
[`prettier.resolveConfig()`](https://prettier.io/docs/api#prettierresolveconfigfileurlorpath--options) now accepts an [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string that starts with `file:` as custom config file location.
|
||||
|
||||
```js
|
||||
// `URL`
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
`*.frag` was interpreted as JavaScript files, but `.frag` is also used in GLSL([OpenGL Shading Language](https://en.wikipedia.org/wiki/OpenGL_Shading_Language)). It causes error when Prettier try to format them as JavaScript files.
|
||||
|
||||
Since Prettier main, `*.frag` files except `*.start.frag`, `*.end.frag`, `start.frag`, and `end.frag` no longer treat as JavaScript files.
|
||||
Since Prettier main, `*.frag` files except `*.start.frag`, `*.end.frag`, `start.frag`, and `end.frag` are no longer treated as JavaScript files.
|
||||
|
||||
If you have JavaScript files with `.frag` not match patterns mentioned above, you can config with `overrides`.
|
||||
If you have JavaScript files with `.frag` that do not match the patterns mentioned above, you can config with `overrides`.
|
||||
|
||||
```js
|
||||
export default {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Add `isSupported` function support for `languages` API (#17331 by @JounQin, #17490 by @fisker)
|
||||
|
||||
Previously, `languages` API for custom plugin only supported to infer parser based on the file basename or extension.
|
||||
Previously, `languages` API for custom plugins only supported inferring parser based on the file basename or extension.
|
||||
|
||||
Prettier main added `isSupported: (options: { filepath: string }) => boolean` function to allow plugin check if file is supported based on the full path (eg: files in a specific directory).
|
||||
|
||||
@@ -11,7 +11,7 @@ When using from APIs(eg: `prettier.format()`), Prettier can not ensure it's a va
|
||||
|
||||
:::
|
||||
|
||||
If no `isSupported` provided, it just behaviors the same way as before.
|
||||
If no `isSupported` provided, it just behaves the same way as before.
|
||||
|
||||
```js
|
||||
export const languages = [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Fix plugin loading in `prettier.getFileInfo()` (#17548 by @fisker)
|
||||
|
||||
In previous version, `prettier.getFileInfo()` only read `parser` config from `.prettierrc`, but doesn't load plugin to infer parser from plugin `languages`, Prettier main fixed it.
|
||||
In previous version, `prettier.getFileInfo()` only read `parser` config from `.prettierrc`, but doesn't load plugins to infer parser from plugin `languages`, Prettier main fixed it.
|
||||
|
||||
```js
|
||||
// prettier-plugin-foo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### [HIGHLIGHT] Support experimental CLI (#17151, #17396 by @fisker)
|
||||
|
||||
You may already heard or used our new [performance improved CLI](https://prettier.io/blog/2023/11/30/cli-deep-dive). From prettier main, you can now use it without installing unstable v4 version.
|
||||
You may have already heard of or used our new [performance improved CLI](https://prettier.io/blog/2023/11/30/cli-deep-dive). From prettier main, you can now use it without installing unstable v4 version.
|
||||
|
||||
```sh
|
||||
# Run CLI with `--experimental-cli`
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#### Ignore file modified time when `--cache-strategy=content` (#17438 by @fisker)
|
||||
|
||||
In previous version, when using `--cache-strategy=content`, if the file modified time changed, it still get re-formatted even the file content didn't change, Prettier main fixed it.
|
||||
In previous version, when using `--cache-strategy=content`, if the file modified time changed, it still gets re-formatted even the file content didn't change, Prettier main fixed it.
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Fix exitCode when parser can not infer (#17505 by @fisker)
|
||||
#### Fix exitCode when parser cannot infer (#17505 by @fisker)
|
||||
|
||||
```console
|
||||
touch unknown
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Support `@utility` directive for Tailwind (#17362 by @sosukesuzuki)
|
||||
|
||||
This changes supports `@utility` directive for Tailwind CSS V4.
|
||||
This change supports `@utility` directive for Tailwind CSS V4.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```css
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
`@prettier/plugin-hermes` is based on [Hermes JS Engine](https://github.com/facebook/hermes/blob/main/README.md).
|
||||
|
||||
This plugin include a new parser `hermes` (Flow syntax), to use this plugin:
|
||||
This plugin includes a new parser `hermes` (Flow syntax), to use this plugin:
|
||||
|
||||
1. Install the plugin
|
||||
|
||||
@@ -17,7 +17,7 @@ This plugin include a new parser `hermes` (Flow syntax), to use this plugin:
|
||||
- "@prettier/plugin-hermes"
|
||||
```
|
||||
|
||||
Due to package size limitation, this plugin is not included in the `prettier` package, it needs to be installed separately.
|
||||
Due to package size limitations, this plugin is not included in the `prettier` package, it needs to be installed separately.
|
||||
|
||||
**We plan to make this as the default parser for Flow syntax support in v4, we'll also remove `babel-flow` parser in v4, please give it a try.**
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Add parentheses to `AssignmentExpression` in class property keys (#17145 by @fisker)
|
||||
|
||||
Previously we only add parentheses to `AssignmentExpression` in object keys, but not in class property keys. Thanks for [Biome](https://biomejs.dev/formatter/differences-with-prettier/#prettier-has-an-inconsistent-behavior-for-assignment-in-computed-keys) to bring our attention on this inconsistent.
|
||||
Previously we only add parentheses to `AssignmentExpression` in object keys, but not in class property keys. Thanks to [Biome](https://biomejs.dev/formatter/differences-with-prettier/#prettier-has-an-inconsistent-behavior-for-assignment-in-computed-keys) for bringing our attention to this inconsistency.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#### Add parentheses to numbers in optional member expression (#17190 by @fisker)
|
||||
|
||||
There is a inconsistency when formatting member expression where the object is a number before Prettier main.
|
||||
There is an inconsistency when formatting member expression where the object is a number before Prettier main.
|
||||
|
||||
When using `babel` parser(and other Babel based parsers), we print the number as unparenthesized, when using `typescript` parser(and other ESTree parsers), we print it as parenthesized.
|
||||
|
||||
Technically parentheses are not needed, but if we print it as `1?.toString()` and later users realizes it's unnecessary to use `?.`, users can't simply remove the question mark because `1.toString()` will raise a `SyntaxError`, for this reason, we decide to always put parentheses around it.
|
||||
Technically parentheses are not needed, but if we print it as `1?.toString()` and later users realize it's unnecessary to use `?.`, users can't simply remove the question mark because `1.toString()` will raise a `SyntaxError`, for this reason, we decide to always put parentheses around it.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#### Removed support for experimental `Records & Tuples` (#17363 by @fisker)
|
||||
|
||||
The the ES proposal [JavaScript Records & Tuples Proposal](https://github.com/tc39/proposal-record-tuple) has been withdrawn.
|
||||
The ES proposal [JavaScript Records & Tuples Proposal](https://github.com/tc39/proposal-record-tuple) has been withdrawn.
|
||||
|
||||
- [Disclaimer about non-standard syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
`@prettier/plugin-oxc` is based on [OXC](https://oxc.rs/)(A **fast** JavaScript and TypeScript parser in Rust).
|
||||
|
||||
This plugin include two new parser `oxc` (JavaScript syntax) and `oxc-ts` (TypeScript syntax), to use this plugin:
|
||||
This plugin includes two new parsers `oxc` (JavaScript syntax) and `oxc-ts` (TypeScript syntax), to use this plugin:
|
||||
|
||||
1. Install the plugin
|
||||
|
||||
@@ -17,7 +17,7 @@ This plugin include two new parser `oxc` (JavaScript syntax) and `oxc-ts` (TypeS
|
||||
- "@prettier/plugin-oxc"
|
||||
```
|
||||
|
||||
Due to package size limitation, this plugin is not included in the `prettier` package, it needs to be installed separately.
|
||||
Due to package size limitations, this plugin is not included in the `prettier` package, it needs to be installed separately.
|
||||
|
||||
For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-oxc).
|
||||
|
||||
|
||||
Reference in new issue
Block a user