@putout/plugin-putout 29.6.1 → 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
CHANGED
|
@@ -25,10 +25,12 @@ npm i @putout/plugin-putout -D
|
|
|
25
25
|
- ✅ [add-crawl-file](#add-crawl-file);
|
|
26
26
|
- ✅ [add-track-file](#add-track-file);
|
|
27
27
|
- ✅ [apply-async-formatter](#apply-async-formatter);
|
|
28
|
+
- ✅ [apply-get-binding](#apply-get-binding);
|
|
28
29
|
- ✅ [apply-create-test](#apply-create-test);
|
|
29
30
|
- ✅ [apply-create-nested-directory](#apply-create-nested-directory);
|
|
30
31
|
- ✅ [apply-declare](#apply-declare);
|
|
31
32
|
- ✅ [apply-destructuring](#apply-destructuring);
|
|
33
|
+
- ✅ [apply-destructuring-to-options](#apply-destructuring);
|
|
32
34
|
- ✅ [apply-engine-node-version](#apply-engine-node-version);
|
|
33
35
|
- ✅ [apply-exports](#apply-exports);
|
|
34
36
|
- ✅ [apply-exports-to-add-args](#apply-exports-to-add-args);
|
|
@@ -119,11 +121,13 @@ npm i @putout/plugin-putout -D
|
|
|
119
121
|
"putout/apply-async-formatter": "on",
|
|
120
122
|
"putout/apply-declare": "on",
|
|
121
123
|
"putout/apply-destructuring": "on",
|
|
124
|
+
"putout/apply-destructuring-to-options": "on",
|
|
122
125
|
"putout/apply-engine-node-version": "off",
|
|
123
126
|
"putout/apply-exports": "off",
|
|
124
127
|
"putout/apply-exports-to-add-args": "on",
|
|
125
128
|
"putout/apply-exports-to-match-files": "on",
|
|
126
129
|
"putout/apply-exports-to-rename-files": "on",
|
|
130
|
+
"putout/apply-get-binding": "on",
|
|
127
131
|
"putout/apply-report": "on",
|
|
128
132
|
"putout/apply-processors-destructuring": "on",
|
|
129
133
|
"putout/apply-rename": "on",
|
|
@@ -206,6 +210,22 @@ path.node = Identifier('x');
|
|
|
206
210
|
path.node = identifier('x');
|
|
207
211
|
```
|
|
208
212
|
|
|
213
|
+
## apply-get-binding
|
|
214
|
+
|
|
215
|
+
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6c82eac69034a1bb10405aec9d0c9df1/acc0ced44417671f1af60b84f4d9707c735365f0).
|
|
216
|
+
|
|
217
|
+
### ❌ Example of incorrect code
|
|
218
|
+
|
|
219
|
+
```js
|
|
220
|
+
path.scope.getBinding('require');
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### ✅ Example of correct code
|
|
224
|
+
|
|
225
|
+
```js
|
|
226
|
+
getBinding(path, 'require');
|
|
227
|
+
```
|
|
228
|
+
|
|
209
229
|
## apply-report
|
|
210
230
|
|
|
211
231
|
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e9debc0b256556a632fb031be86afffc/afefbd44443f07dbb7d8f2972f2e40a9a82c214f).
|
|
@@ -584,6 +604,22 @@ const putout = require('putout');
|
|
|
584
604
|
const {putout} = require('putout');
|
|
585
605
|
```
|
|
586
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
|
+
|
|
587
623
|
## apply-engine-node-version
|
|
588
624
|
|
|
589
625
|
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/7ed4860732476de489ae149c7f09e2fe/d8b6e131596c0888ec8b99d4728cd999b17165c9).
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as applyDestructuringToOptions from './apply-destructuring-to-options/index.js';
|
|
2
|
+
import * as applyGetBinding from './apply-get-binding/index.js';
|
|
1
3
|
import * as applyNameToIsIdentifier from './apply-name-to-is-identifier/index.js';
|
|
2
4
|
import * as addPathArgToFilter from './add-path-arg-to-filter/index.js';
|
|
3
5
|
import * as removeUselessSourceArgument from './remove-useless-source-argument/index.js';
|
|
@@ -168,4 +170,6 @@ export const rules = {
|
|
|
168
170
|
'remove-useless-source-argument': removeUselessSourceArgument,
|
|
169
171
|
'add-path-arg-to-filter': addPathArgToFilter,
|
|
170
172
|
'apply-name-to-is-identifier': applyNameToIsIdentifier,
|
|
173
|
+
'apply-get-binding': applyGetBinding,
|
|
174
|
+
'apply-destructuring-to-options': applyDestructuringToOptions,
|
|
171
175
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin helps with plugins development",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"@putout/plugin-nodejs": "*",
|
|
49
49
|
"@putout/plugin-tape": "*",
|
|
50
50
|
"@putout/test": "^15.0.0",
|
|
51
|
-
"c8": "^11.0.0",
|
|
52
51
|
"eslint": "^10.0.0",
|
|
53
52
|
"eslint-plugin-n": "^17.0.0",
|
|
54
53
|
"eslint-plugin-putout": "^31.0.0",
|
|
55
54
|
"madrun": "^13.0.0",
|
|
56
55
|
"montag": "^1.2.1",
|
|
57
56
|
"nodemon": "^3.0.1",
|
|
57
|
+
"superc8": "^12.0.0",
|
|
58
58
|
"supertape": "^12.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|