prettier-plugin-hug-call-arguments 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +24 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,30 @@
16
16
 
17
17
  Fixes [prettier/prettier#11080](https://github.com/prettier/prettier/issues/11080).
18
18
 
19
+ ## Usage
20
+
21
+ Requires Prettier 3.x as a peer dependency.
22
+
23
+ ```sh
24
+ npm install --save-dev prettier-plugin-hug-call-arguments
25
+ ```
26
+
27
+ Add it to your Prettier config (`.prettierrc`, `.prettierrc.json`,
28
+ `prettier.config.js`, or the `"prettier"` key in `package.json`):
29
+
30
+ ```json
31
+ {
32
+ "plugins": ["prettier-plugin-hug-call-arguments"]
33
+ }
34
+ ```
35
+
36
+ No other options — it works automatically wherever Prettier already formats
37
+ JS/JSX/TS/TSX with the `estree` printer (the `babel`, `babel-ts`, and
38
+ `typescript` parsers). Nothing to configure, and every case it doesn't
39
+ recognize is left to Prettier's own formatting untouched.
40
+
41
+ ## Examples
42
+
19
43
  Prettier hugs the last argument of a call when it's a function/object/array
20
44
  literal:
21
45
 
@@ -119,20 +143,6 @@ shapes.
119
143
  Every other node, and every `CallExpression` that doesn't match one of these
120
144
  shapes, is delegated unchanged to Prettier's original printer.
121
145
 
122
- ## Usage
123
-
124
- ```sh
125
- npm install --save-dev prettier-plugin-hug-call-arguments
126
- ```
127
-
128
- `.prettierrc`:
129
-
130
- ```json
131
- {
132
- "plugins": ["prettier-plugin-hug-call-arguments"]
133
- }
134
- ```
135
-
136
146
  ## Development
137
147
 
138
148
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prettier-plugin-hug-call-arguments",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Prettier plugin: hug the last call argument even when it's wrapped in another call, e.g. app.delete(\"/x\", catchAsync(async (req, res) => { ... })). Fixes https://github.com/prettier/prettier/issues/11080",
5
5
  "author": "soso tsertsvadze",
6
6
  "license": "MIT",