@putout/engine-runner 14.0.2 β 14.1.1
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 +13 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ npm i @putout/engine-runner
|
|
|
15
15
|
|
|
16
16
|
There is a couple plugin types supported by π**Putout**:
|
|
17
17
|
|
|
18
|
-
- β
[
|
|
19
|
-
- β
[
|
|
20
|
-
- β
[
|
|
21
|
-
- β
[
|
|
18
|
+
- β
[**Replacer**](#replacer)
|
|
19
|
+
- β
[**Includer**](#includer)
|
|
20
|
+
- β
[**Traverser**](#traverser)
|
|
21
|
+
- β
[**Finder**](#finder)
|
|
22
22
|
|
|
23
23
|
All of them supports subset of **JavaScript** π¦[**PutoutScript**](https://github.com/coderaiser/putout/blob/master/docs/putout-script.md#-putoutscript) described in [`@putout/compare`](https://github.com/coderaiser/putout/tree/master/packages/compare#readme).
|
|
24
24
|
|
|
@@ -145,7 +145,7 @@ module.exports.replace = () => ({
|
|
|
145
145
|
|
|
146
146
|
### Includer
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
**Includer** is the most preferable format of a plugin, simplest to use (after `Replacer`):
|
|
149
149
|
|
|
150
150
|
```js
|
|
151
151
|
module.exports.report = () => 'debugger statement should not be used';
|
|
@@ -178,7 +178,7 @@ Where `__` can be any node. All this possible with help of [@putout/compare](htt
|
|
|
178
178
|
|
|
179
179
|
### Traverser
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
**Traverser** gives you more power to `filter` and `fix` nodes you need.
|
|
182
182
|
|
|
183
183
|
```js
|
|
184
184
|
module.exports.report = () => 'debugger statement should not be used';
|
|
@@ -196,7 +196,7 @@ module.exports.traverse = ({push}) => ({
|
|
|
196
196
|
|
|
197
197
|
### Finder
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
**Finder** gives you all the control over traversing, but it's the slowest format.
|
|
200
200
|
Because `traversers` not merged in contrast with other plugin formats.
|
|
201
201
|
|
|
202
202
|
```js
|
|
@@ -219,7 +219,7 @@ module.exports.find = (ast, {push, traverse}) => {
|
|
|
219
219
|
|
|
220
220
|
```js
|
|
221
221
|
const {runPlugins} = require('@putout/engine-runner');
|
|
222
|
-
const {parse} = require('@putout/
|
|
222
|
+
const {parse} = require('@putout/engine-parser');
|
|
223
223
|
|
|
224
224
|
const plugins = [{
|
|
225
225
|
rule: 'remove-debugger',
|
|
@@ -248,11 +248,11 @@ const places = runPlugins({
|
|
|
248
248
|
Stores is preferred way of keeping π**Putout** data, `traverse` init function called only once, and any other way
|
|
249
249
|
of handling variables will most likely will lead to bugs. There is a couple store types:
|
|
250
250
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
251
|
+
- β
[`listStore`](#liststore);
|
|
252
|
+
- β
[`pathStore`](#pathstore);
|
|
253
|
+
- β
[`store`](#store);
|
|
254
|
+
- β
[`upstore`](#upstore);
|
|
255
|
+
- β
[`uplist`](#uplist);
|
|
256
256
|
|
|
257
257
|
Let's talk about each of them.
|
|
258
258
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-runner",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Run πPutout plugins",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"eslint-plugin-n": "^15.2.4",
|
|
49
49
|
"eslint-plugin-putout": "^16.0.0",
|
|
50
50
|
"just-camel-case": "^4.0.2",
|
|
51
|
-
"lerna": "^
|
|
51
|
+
"lerna": "^6.0.1",
|
|
52
52
|
"madrun": "^9.0.0",
|
|
53
53
|
"mock-require": "^3.0.3",
|
|
54
54
|
"montag": "^1.0.0",
|