Process files only supported by plugins (#15433)
This commit is contained in:
1 parent
65ee35800a
commit
9f06cdd5b0
30 files changed
+419
-58
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#### Process files only supported by plugins (#15433 by @sosukesuzuki)
|
||||
|
||||
In Prettier 3.0, when specifying a directory from the CLI, only files with default supported extensions were processed.
|
||||
|
||||
In the following scenario, not just `foo.js` but also `foo.astro` should be formatted:
|
||||
|
||||
```
|
||||
# Prettier stable version
|
||||
|
||||
$ ls .
|
||||
foo.js foo.astro
|
||||
|
||||
$ cat .prettierrc
|
||||
{ "plugins": ["prettier-plugin-astro"] }
|
||||
|
||||
$ prettier --write .
|
||||
foo.js 20ms
|
||||
```
|
||||
|
||||
With this update, both `foo.js` and `foo.astro` will now be formatted:
|
||||
|
||||
```
|
||||
# Prettier main branch
|
||||
|
||||
$ prettier --write .
|
||||
foo.js 20ms
|
||||
foo.astro 32ms
|
||||
```
|
||||
|
||||
You can replace `prettier "**/*" --ignore-unknown` with `prettier .` since they are equivalent now.
|
||||
Reference in new issue
Block a user