@putout/plugin-putout 29.6.1 → 29.7.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-get-binding/index.js +5 -0
- package/lib/index.js +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ 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);
|
|
@@ -124,6 +125,7 @@ npm i @putout/plugin-putout -D
|
|
|
124
125
|
"putout/apply-exports-to-add-args": "on",
|
|
125
126
|
"putout/apply-exports-to-match-files": "on",
|
|
126
127
|
"putout/apply-exports-to-rename-files": "on",
|
|
128
|
+
"putout/apply-get-binding": "on",
|
|
127
129
|
"putout/apply-report": "on",
|
|
128
130
|
"putout/apply-processors-destructuring": "on",
|
|
129
131
|
"putout/apply-rename": "on",
|
|
@@ -206,6 +208,22 @@ path.node = Identifier('x');
|
|
|
206
208
|
path.node = identifier('x');
|
|
207
209
|
```
|
|
208
210
|
|
|
211
|
+
## apply-get-binding
|
|
212
|
+
|
|
213
|
+
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6c82eac69034a1bb10405aec9d0c9df1/acc0ced44417671f1af60b84f4d9707c735365f0).
|
|
214
|
+
|
|
215
|
+
### ❌ Example of incorrect code
|
|
216
|
+
|
|
217
|
+
```js
|
|
218
|
+
path.scope.getBinding('require');
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### ✅ Example of correct code
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
getBinding(path, 'require');
|
|
225
|
+
```
|
|
226
|
+
|
|
209
227
|
## apply-report
|
|
210
228
|
|
|
211
229
|
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e9debc0b256556a632fb031be86afffc/afefbd44443f07dbb7d8f2972f2e40a9a82c214f).
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as applyGetBinding from './apply-get-binding/index.js';
|
|
1
2
|
import * as applyNameToIsIdentifier from './apply-name-to-is-identifier/index.js';
|
|
2
3
|
import * as addPathArgToFilter from './add-path-arg-to-filter/index.js';
|
|
3
4
|
import * as removeUselessSourceArgument from './remove-useless-source-argument/index.js';
|
|
@@ -168,4 +169,5 @@ export const rules = {
|
|
|
168
169
|
'remove-useless-source-argument': removeUselessSourceArgument,
|
|
169
170
|
'add-path-arg-to-filter': addPathArgToFilter,
|
|
170
171
|
'apply-name-to-is-identifier': applyNameToIsIdentifier,
|
|
172
|
+
'apply-get-binding': applyGetBinding,
|
|
171
173
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.7.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": {
|