@putout/plugin-putout 29.3.0 → 29.4.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
|
@@ -40,6 +40,7 @@ npm i @putout/plugin-putout -D
|
|
|
40
40
|
- ✅ [apply-insert-before](#apply-insert-before);
|
|
41
41
|
- ✅ [apply-traverser-to-ignore](#apply-traverser-to-ignore);
|
|
42
42
|
- ✅ [apply-vars](#apply-vars);
|
|
43
|
+
- ✅ [apply-name-to-is-identifier](#apply-name-to-is-identifier);
|
|
43
44
|
- ✅ [apply-lowercase-to-node-builders](#apply-lowercase-to-node-builders);
|
|
44
45
|
- ✅ [apply-namespace-specifier](#apply-namespace-specifier);
|
|
45
46
|
- ✅ [apply-report](#apply-report);
|
|
@@ -133,6 +134,7 @@ npm i @putout/plugin-putout -D
|
|
|
133
134
|
"putout/apply-traverser-to-ignore": "on",
|
|
134
135
|
"putout/apply-insert-after": "on",
|
|
135
136
|
"putout/apply-vars": "on",
|
|
137
|
+
"putout/apply-name-to-is-identifier": "on",
|
|
136
138
|
"putout/apply-short-processors": "on",
|
|
137
139
|
"putout/apply-lowercase-to-node-builders": "on",
|
|
138
140
|
"putout/apply-namespace-specifier": "on",
|
|
@@ -522,6 +524,24 @@ export const match = () => ({
|
|
|
522
524
|
});
|
|
523
525
|
```
|
|
524
526
|
|
|
527
|
+
## apply-name-to-is-identifier
|
|
528
|
+
|
|
529
|
+
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9d416e21377a53ef13066007f7037bdf/e179718fe1908851c26f10ba84fab1bf7ebca3ce).
|
|
530
|
+
|
|
531
|
+
### ❌ Example of incorrect code
|
|
532
|
+
|
|
533
|
+
```js
|
|
534
|
+
isIdentifier(path, 'hello');
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### ✅ Example of correct code
|
|
538
|
+
|
|
539
|
+
```js
|
|
540
|
+
isIdentifier(path, {
|
|
541
|
+
name: 'hello',
|
|
542
|
+
});
|
|
543
|
+
```
|
|
544
|
+
|
|
525
545
|
## apply-declare
|
|
526
546
|
|
|
527
547
|
Better to use [`Declareator`](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#declarator) instead of `operator.declare()`.
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as applyNameToIsIdentifier from './apply-name-to-is-identifier/index.js';
|
|
2
|
+
import * as addPathArgToFilter from './add-path-arg-to-filter/index.js';
|
|
2
3
|
import * as removeUselessSourceArgument from './remove-useless-source-argument/index.js';
|
|
3
4
|
import * as applyTraverserToIgnore from './apply-traverser-to-ignore/index.js';
|
|
4
5
|
import * as addPathArgToMatch from './add-path-arg-to-match/index.js';
|
|
@@ -165,5 +166,6 @@ export const rules = {
|
|
|
165
166
|
'add-path-arg-to-match': addPathArgToMatch,
|
|
166
167
|
'apply-traverser-to-ignore': applyTraverserToIgnore,
|
|
167
168
|
'remove-useless-source-argument': removeUselessSourceArgument,
|
|
168
|
-
'add-path-to-filter':
|
|
169
|
+
'add-path-arg-to-filter': addPathArgToFilter,
|
|
170
|
+
'apply-name-to-is-identifier': applyNameToIsIdentifier,
|
|
169
171
|
};
|
package/package.json
CHANGED
|
File without changes
|