@putout/plugin-putout 21.0.0 → 21.1.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 +28 -6
- package/lib/add-path-arg-to-fix/index.js +8 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ npm i @putout/plugin-putout -D
|
|
|
16
16
|
- ✅ [add-await-to-progress](#add-await-to-progress);
|
|
17
17
|
- ✅ [add-index-to-import](#add-index-to-import);
|
|
18
18
|
- ✅ [add-places-to-compare-places](#add-places-to-compare-places);
|
|
19
|
+
- ✅ [add-path-arg-to-fix](#add-path-arg-to-fix);
|
|
19
20
|
- ✅ [add-test-args](#add-test-args);
|
|
20
21
|
- ✅ [add-traverse-args](#add-traverse-args);
|
|
21
22
|
- ✅ [add-track-file](#add-track-file);
|
|
@@ -71,6 +72,13 @@ npm i @putout/plugin-putout -D
|
|
|
71
72
|
```json
|
|
72
73
|
{
|
|
73
74
|
"rules": {
|
|
75
|
+
"putout/add-places-to-compare-places": "on",
|
|
76
|
+
"putout/add-path-arg-to-fix": "on",
|
|
77
|
+
"putout/add-test-args": "on",
|
|
78
|
+
"putout/add-traverse-args": "on",
|
|
79
|
+
"putout/add-track-file": "on",
|
|
80
|
+
"putout/add-await-to-progress": "on",
|
|
81
|
+
"putout/add-index-to-import": "on",
|
|
74
82
|
"putout/apply-create-test": "on",
|
|
75
83
|
"putout/apply-processors-destructuring": "on",
|
|
76
84
|
"putout/apply-async-formatter": "on",
|
|
@@ -82,12 +90,6 @@ npm i @putout/plugin-putout -D
|
|
|
82
90
|
"putout/apply-short-processors": "on",
|
|
83
91
|
"putout/apply-namespace-specifier": "on",
|
|
84
92
|
"putout/apply-for-of-to-track-file": "on",
|
|
85
|
-
"putout/add-places-to-compare-places": "on",
|
|
86
|
-
"putout/add-test-args": "on",
|
|
87
|
-
"putout/add-traverse-args": "on",
|
|
88
|
-
"putout/add-track-file": "on",
|
|
89
|
-
"putout/add-await-to-progress": "on",
|
|
90
|
-
"putout/add-index-to-import": "on",
|
|
91
93
|
"putout/check-match": "on",
|
|
92
94
|
"putout/check-replace-code": ["on", {
|
|
93
95
|
"once": true
|
|
@@ -820,6 +822,26 @@ comparePlaces('hello');
|
|
|
820
822
|
comparePlaces('hello', []);
|
|
821
823
|
```
|
|
822
824
|
|
|
825
|
+
## add-path-arg-to-fix
|
|
826
|
+
|
|
827
|
+
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/3d3fb6b8f5e5376cdd1674c9b19e0e27/4872f77e680a2fc443618f4bf5fae3ffab11046a).
|
|
828
|
+
|
|
829
|
+
### ❌ Example of incorrect code
|
|
830
|
+
|
|
831
|
+
```js
|
|
832
|
+
export const fix = () => {
|
|
833
|
+
path.remove();
|
|
834
|
+
};
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
### ✅ Example of correct code
|
|
838
|
+
|
|
839
|
+
```js
|
|
840
|
+
export const fix = (path) => {
|
|
841
|
+
path.remove();
|
|
842
|
+
};
|
|
843
|
+
```
|
|
844
|
+
|
|
823
845
|
## add-test-args
|
|
824
846
|
|
|
825
847
|
### ❌ Example of incorrect code
|
package/lib/index.js
CHANGED
|
@@ -52,6 +52,7 @@ const removeUnusedGetPropertiesArgument = require('./remove-unused-get-propertie
|
|
|
52
52
|
const simplifyReplaceTemplate = require('./simplify-replace-template');
|
|
53
53
|
const removeEmptyArrayFromProcess = require('./remove-empty-array-from-process');
|
|
54
54
|
const addPlacesToComparePlaces = require('./add-places-to-compare-places');
|
|
55
|
+
const addPathArgToFix = require('./add-path-arg-to-fix');
|
|
55
56
|
|
|
56
57
|
module.exports.rules = {
|
|
57
58
|
'apply-processors-destructuring': applyProcessorsDestructuring,
|
|
@@ -106,4 +107,5 @@ module.exports.rules = {
|
|
|
106
107
|
'simplify-replace-template': simplifyReplaceTemplate,
|
|
107
108
|
'remove-empty-array-from-process': removeEmptyArrayFromProcess,
|
|
108
109
|
'add-places-to-compare-places': addPlacesToComparePlaces,
|
|
110
|
+
'add-path-arg-to-fix': addPathArgToFix,
|
|
109
111
|
};
|
package/package.json
CHANGED