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

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 +32 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,38 @@
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
+ ```sh
28
+ yarn add --dev prettier-plugin-hug-call-arguments
29
+ ```
30
+
31
+ ```sh
32
+ pnpm add --save-dev prettier-plugin-hug-call-arguments
33
+ ```
34
+
35
+ Add it to your Prettier config (`.prettierrc`, `.prettierrc.json`,
36
+ `prettier.config.js`, or the `"prettier"` key in `package.json`):
37
+
38
+ ```json
39
+ {
40
+ "plugins": ["prettier-plugin-hug-call-arguments"]
41
+ }
42
+ ```
43
+
44
+ No other options — it works automatically wherever Prettier already formats
45
+ JS/JSX/TS/TSX with the `estree` printer (the `babel`, `babel-ts`, and
46
+ `typescript` parsers). Nothing to configure, and every case it doesn't
47
+ recognize is left to Prettier's own formatting untouched.
48
+
49
+ ## Examples
50
+
19
51
  Prettier hugs the last argument of a call when it's a function/object/array
20
52
  literal:
21
53
 
@@ -119,20 +151,6 @@ shapes.
119
151
  Every other node, and every `CallExpression` that doesn't match one of these
120
152
  shapes, is delegated unchanged to Prettier's original printer.
121
153
 
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
154
  ## Development
137
155
 
138
156
  ```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.5",
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",