@putout/plugin-putout 27.5.0 → 27.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
|
@@ -59,6 +59,7 @@ npm i @putout/plugin-putout -D
|
|
|
59
59
|
- ✅ [convert-progress-to-track-file](#convert-progress-to-track-file);
|
|
60
60
|
- ✅ [convert-putout-test-to-create-test](#convert-putout-test-to-create-test);
|
|
61
61
|
- ✅ [convert-plugins-element-to-tuple](#convert-plugins-element-to-tuple);
|
|
62
|
+
- ✅ [convert-push-object-to-push-path](#convert-push-object-to-push-path);
|
|
62
63
|
- ✅ [convert-replace-to-function](#convert-replace-to-function);
|
|
63
64
|
- ✅ [convert-replace-with](#convert-replace-with);
|
|
64
65
|
- ✅ [convert-replace-with-multiple](#convert-replace-with-multiple);
|
|
@@ -147,6 +148,7 @@ npm i @putout/plugin-putout -D
|
|
|
147
148
|
"putout/convert-get-rule-to-require": "on",
|
|
148
149
|
"putout/convert-progress-to-track-file": "on",
|
|
149
150
|
"putout/convert-plugins-element-to-tuple": "on",
|
|
151
|
+
"putout/convert-push-object-to-push-path": "on",
|
|
150
152
|
"putout/create-test": "on",
|
|
151
153
|
"putout/shorten-imports": "on",
|
|
152
154
|
"putout/declare": "on",
|
|
@@ -809,6 +811,24 @@ t.transform('nested-not-block', [
|
|
|
809
811
|
]);
|
|
810
812
|
```
|
|
811
813
|
|
|
814
|
+
## convert-push-object-to-push-path
|
|
815
|
+
|
|
816
|
+
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/abcc9f79469db69849b6d6efd3e85a8a/0536c9f780a0c9db2feed3be92299a22f06b9720).
|
|
817
|
+
|
|
818
|
+
### ❌ Example of incorrect code
|
|
819
|
+
|
|
820
|
+
```js
|
|
821
|
+
push({
|
|
822
|
+
path: child,
|
|
823
|
+
});
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
### ✅ Example of correct code
|
|
827
|
+
|
|
828
|
+
```js
|
|
829
|
+
push(child);
|
|
830
|
+
```
|
|
831
|
+
|
|
812
832
|
## convert-to-no-transform-code
|
|
813
833
|
|
|
814
834
|
### ❌ Example of incorrect code
|
|
@@ -6,4 +6,9 @@ export default {
|
|
|
6
6
|
addAttributeValue: 'const {addAttributeValue} = operator',
|
|
7
7
|
removeAttributeValue: 'const {removeAttributeValue} = operator',
|
|
8
8
|
setAttributeValue: 'const {setAttributeValue} = operator',
|
|
9
|
+
addClassName: 'const {addClassName} = operator',
|
|
10
|
+
getClassName: 'const {getClassName} = operator',
|
|
11
|
+
removeClassName: 'const {removeClassName} = operator',
|
|
12
|
+
containsClassName: 'const {containsClassName} = operator',
|
|
13
|
+
hasDataName: 'const {hasDataName} = operator',
|
|
9
14
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as convertPushObjectToPushPath from './convert-push-object-to-push-path/index.js';
|
|
1
2
|
import * as applyTransformWithOptions from './apply-transform-with-options/index.js';
|
|
2
3
|
import * as convertPluginsElementToTuple from './convert-plugins-element-to-tuple/index.js';
|
|
3
4
|
import * as removeEmptyObjectFromTransform from './remove-empty-object-from-transform/index.js';
|
|
@@ -142,4 +143,5 @@ export const rules = {
|
|
|
142
143
|
'remove-empty-object-from-transform': removeEmptyObjectFromTransform,
|
|
143
144
|
'convert-plugins-element-to-tuple': convertPluginsElementToTuple,
|
|
144
145
|
'apply-transform-with-options': applyTransformWithOptions,
|
|
146
|
+
'convert-push-object-to-push-path': convertPushObjectToPushPath,
|
|
145
147
|
};
|
package/package.json
CHANGED