@vyriy/prettier-config 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ Shared Prettier config for Vyriy projects.
|
|
|
7
7
|
This package provides the base Prettier setup used in Vyriy repositories, including the multiline arrays plugin and common formatting defaults.
|
|
8
8
|
Arrays with more than three elements are formatted across multiple lines.
|
|
9
9
|
|
|
10
|
+
Prettier is responsible for formatting syntactically valid code. It does not replace TypeScript, ESLint, Stylelint, or tests; it is one small validation and formatting step in the shared Vyriy workflow.
|
|
11
|
+
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
14
|
With npm:
|
|
@@ -44,9 +46,22 @@ const config: Config = {
|
|
|
44
46
|
export default config;
|
|
45
47
|
```
|
|
46
48
|
|
|
49
|
+
Run Prettier against a file or folder:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx prettier index.ts
|
|
53
|
+
npx prettier index.ts --write
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If Prettier cannot parse a file, it stops and reports the syntax error location instead of rewriting the file.
|
|
57
|
+
|
|
47
58
|
## Formatting Scope
|
|
48
59
|
|
|
49
60
|
Prettier controls multiline arrays through `prettier-plugin-multiline-arrays`.
|
|
50
61
|
Object multiline checks are handled by `@vyriy/eslint-config`.
|
|
51
62
|
|
|
52
63
|
Prettier does not support a stable count-based rule for import or export specifiers. If import or export specifiers fit within `printWidth`, Prettier may keep them on one line.
|
|
64
|
+
|
|
65
|
+
## Full Example
|
|
66
|
+
|
|
67
|
+
See the article with a complete usage walkthrough: <https://vyriy.dev/examples/vyriy-prettier-config/>.
|