@putout/plugin-putout 20.5.0 → 20.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
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
|
|
@@ -870,6 +890,28 @@ module.exports.traverse = ({store}) => ({
|
|
|
870
890
|
});
|
|
871
891
|
```
|
|
872
892
|
|
|
893
|
+
- [`listStore``](https://github.com/coderaiser/putout/blob/master/packages/engine-runner/README.md#liststore)
|
|
894
|
+
|
|
895
|
+
### ❌ Example of incorrect code
|
|
896
|
+
|
|
897
|
+
```js
|
|
898
|
+
export const traverse = () => ({
|
|
899
|
+
ImportDeclaration(path) {
|
|
900
|
+
listStore(path);
|
|
901
|
+
},
|
|
902
|
+
});
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
### ✅ Example of correct code
|
|
906
|
+
|
|
907
|
+
```js
|
|
908
|
+
module.exports.traverse = ({listStore}) => ({
|
|
909
|
+
ImportDeclaration(path) {
|
|
910
|
+
listStore(path);
|
|
911
|
+
},
|
|
912
|
+
});
|
|
913
|
+
```
|
|
914
|
+
|
|
873
915
|
- [`pathStore`](https://github.com/coderaiser/putout/blob/master/packages/engine-runner/README.md#pathstore)
|
|
874
916
|
|
|
875
917
|
### ❌ 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin helps with plugins development",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@putout/plugin-tape": "*",
|
|
41
41
|
"@putout/test": "^10.0.0",
|
|
42
|
-
"c8": "^
|
|
42
|
+
"c8": "^10.0.0",
|
|
43
43
|
"eslint": "^9.0.0",
|
|
44
44
|
"eslint-plugin-n": "^17.0.0",
|
|
45
45
|
"eslint-plugin-putout": "^22.0.0",
|