@putout/plugin-putout 20.5.0 → 20.6.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 +21 -1
- package/lib/add-places-to-compare-places/index.js +7 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,10 @@ npm i @putout/plugin-putout -D
|
|
|
13
13
|
|
|
14
14
|
## Rules
|
|
15
15
|
|
|
16
|
-
- ✅ [add-test-args](#add-test-args);
|
|
17
16
|
- ✅ [add-await-to-progress](#add-await-to-progress);
|
|
18
17
|
- ✅ [add-index-to-import](#add-index-to-import);
|
|
18
|
+
- ✅ [add-places-to-compare-places](#add-places-to-compare-places);
|
|
19
|
+
- ✅ [add-test-args](#add-test-args);
|
|
19
20
|
- ✅ [add-traverse-args](#add-traverse-args);
|
|
20
21
|
- ✅ [add-track-file](#add-track-file);
|
|
21
22
|
- ✅ [apply-async-formatter](#apply-async-formatter);
|
|
@@ -81,6 +82,7 @@ npm i @putout/plugin-putout -D
|
|
|
81
82
|
"putout/apply-short-processors": "on",
|
|
82
83
|
"putout/apply-namespace-specifier": "on",
|
|
83
84
|
"putout/apply-for-of-to-track-file": "on",
|
|
85
|
+
"putout/add-places-to-compare-places": "on",
|
|
84
86
|
"putout/add-test-args": "on",
|
|
85
87
|
"putout/add-traverse-args": "on",
|
|
86
88
|
"putout/add-track-file": "on",
|
|
@@ -797,6 +799,24 @@ compare(a, 'const __a = __b');
|
|
|
797
799
|
isIdentifier(a);
|
|
798
800
|
```
|
|
799
801
|
|
|
802
|
+
## add-places-to-compare-places"
|
|
803
|
+
|
|
804
|
+
### ❌ Example of incorrect code
|
|
805
|
+
|
|
806
|
+
[`comparePlaces`](https://github.com/coderaiser/putout/tree/master/packages/test#compareplacesfilename-places-overrides) takes two or more arguments.
|
|
807
|
+
|
|
808
|
+
Checkout in 🐊[Putout Editor](https://putout.cloudcmd.io/#/gist/a83b1a6785bb01102451df4510333f42/a2439f7f44da56318d9a0e44b2602972811d9afb).
|
|
809
|
+
|
|
810
|
+
```js
|
|
811
|
+
comparePlaces('hello');
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
### ✅ Example of correct code
|
|
815
|
+
|
|
816
|
+
```js
|
|
817
|
+
comparePlaces('hello', []);
|
|
818
|
+
```
|
|
819
|
+
|
|
800
820
|
## add-test-args
|
|
801
821
|
|
|
802
822
|
### ❌ Example of incorrect code
|
package/lib/index.js
CHANGED
|
@@ -51,6 +51,7 @@ const applyForOfToTrackFile = require('./apply-for-of-to-track-file');
|
|
|
51
51
|
const removeUnusedGetPropertiesArgument = require('./remove-unused-get-properties-argument');
|
|
52
52
|
const simplifyReplaceTemplate = require('./simplify-replace-template');
|
|
53
53
|
const removeEmptyArrayFromProcess = require('./remove-empty-array-from-process');
|
|
54
|
+
const addPlacesToComparePlaces = require('./add-places-to-compare-places');
|
|
54
55
|
|
|
55
56
|
module.exports.rules = {
|
|
56
57
|
'apply-processors-destructuring': applyProcessorsDestructuring,
|
|
@@ -104,4 +105,5 @@ module.exports.rules = {
|
|
|
104
105
|
'remove-unused-get-properties-argument': removeUnusedGetPropertiesArgument,
|
|
105
106
|
'simplify-replace-template': simplifyReplaceTemplate,
|
|
106
107
|
'remove-empty-array-from-process': removeEmptyArrayFromProcess,
|
|
108
|
+
'add-places-to-compare-places': addPlacesToComparePlaces,
|
|
107
109
|
};
|
package/package.json
CHANGED