@putout/plugin-putout 29.7.0 → 29.8.0
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 +18 -0
- package/lib/apply-destructuring-to-options/index.js +5 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ npm i @putout/plugin-putout -D
|
|
|
30
30
|
- ✅ [apply-create-nested-directory](#apply-create-nested-directory);
|
|
31
31
|
- ✅ [apply-declare](#apply-declare);
|
|
32
32
|
- ✅ [apply-destructuring](#apply-destructuring);
|
|
33
|
+
- ✅ [apply-destructuring-to-options](#apply-destructuring);
|
|
33
34
|
- ✅ [apply-engine-node-version](#apply-engine-node-version);
|
|
34
35
|
- ✅ [apply-exports](#apply-exports);
|
|
35
36
|
- ✅ [apply-exports-to-add-args](#apply-exports-to-add-args);
|
|
@@ -120,6 +121,7 @@ npm i @putout/plugin-putout -D
|
|
|
120
121
|
"putout/apply-async-formatter": "on",
|
|
121
122
|
"putout/apply-declare": "on",
|
|
122
123
|
"putout/apply-destructuring": "on",
|
|
124
|
+
"putout/apply-destructuring-to-options": "on",
|
|
123
125
|
"putout/apply-engine-node-version": "off",
|
|
124
126
|
"putout/apply-exports": "off",
|
|
125
127
|
"putout/apply-exports-to-add-args": "on",
|
|
@@ -602,6 +604,22 @@ const putout = require('putout');
|
|
|
602
604
|
const {putout} = require('putout');
|
|
603
605
|
```
|
|
604
606
|
|
|
607
|
+
## apply-destructuring-to-options
|
|
608
|
+
|
|
609
|
+
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/44f02be3d5b1fcef7dec27edf7bb0016/75e4443ff82350af1b85106af87e488dba1cf178).
|
|
610
|
+
|
|
611
|
+
### ❌ Example of incorrect code
|
|
612
|
+
|
|
613
|
+
```js
|
|
614
|
+
export const filter = (path, options) => {};
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### ✅ Example of correct code
|
|
618
|
+
|
|
619
|
+
```js
|
|
620
|
+
export const filter = (path, {options}) => {};
|
|
621
|
+
```
|
|
622
|
+
|
|
605
623
|
## apply-engine-node-version
|
|
606
624
|
|
|
607
625
|
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/7ed4860732476de489ae149c7f09e2fe/d8b6e131596c0888ec8b99d4728cd999b17165c9).
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as applyDestructuringToOptions from './apply-destructuring-to-options/index.js';
|
|
1
2
|
import * as applyGetBinding from './apply-get-binding/index.js';
|
|
2
3
|
import * as applyNameToIsIdentifier from './apply-name-to-is-identifier/index.js';
|
|
3
4
|
import * as addPathArgToFilter from './add-path-arg-to-filter/index.js';
|
|
@@ -170,4 +171,5 @@ export const rules = {
|
|
|
170
171
|
'add-path-arg-to-filter': addPathArgToFilter,
|
|
171
172
|
'apply-name-to-is-identifier': applyNameToIsIdentifier,
|
|
172
173
|
'apply-get-binding': applyGetBinding,
|
|
174
|
+
'apply-destructuring-to-options': applyDestructuringToOptions,
|
|
173
175
|
};
|
package/package.json
CHANGED