@putout/engine-runner 11.4.1 → 11.5.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 +1 -1
- package/lib/merge-visitors.js +3 -1
- package/lib/run-fix.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,7 +161,7 @@ Where `__` can be any node. All this possible with help of [@putout/compare](htt
|
|
|
161
161
|
```js
|
|
162
162
|
module.exports.report = () => 'debugger statement should not be used';
|
|
163
163
|
|
|
164
|
-
module.exports.fix = (path) => {
|
|
164
|
+
module.exports.fix = (path, {options}) => {
|
|
165
165
|
path.remove();
|
|
166
166
|
};
|
|
167
167
|
|
package/lib/merge-visitors.js
CHANGED
|
@@ -39,6 +39,7 @@ module.exports = (pluginsToMerge, {fix, shebang, template}) => {
|
|
|
39
39
|
rule,
|
|
40
40
|
shebang,
|
|
41
41
|
msg,
|
|
42
|
+
options,
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
pushed[rule] = pull;
|
|
@@ -78,7 +79,7 @@ module.exports = (pluginsToMerge, {fix, shebang, template}) => {
|
|
|
78
79
|
};
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
function getStore(plugin, {fix, rule, shebang, msg}) {
|
|
82
|
+
function getStore(plugin, {fix, rule, shebang, msg, options}) {
|
|
82
83
|
const store = mapStore();
|
|
83
84
|
const list = listStore();
|
|
84
85
|
const placesStore = listStore();
|
|
@@ -96,6 +97,7 @@ function getStore(plugin, {fix, rule, shebang, msg}) {
|
|
|
96
97
|
path,
|
|
97
98
|
rule,
|
|
98
99
|
position,
|
|
100
|
+
options,
|
|
99
101
|
});
|
|
100
102
|
};
|
|
101
103
|
|
package/lib/run-fix.js
CHANGED
|
@@ -4,8 +4,8 @@ const tryCatch = require('try-catch');
|
|
|
4
4
|
const debug = require('debug')('putout:runner:fix');
|
|
5
5
|
const {enabled} = debug;
|
|
6
6
|
|
|
7
|
-
const tryToFix = (fix, {path, position}) => {
|
|
8
|
-
const [e] = tryCatch(fix, path);
|
|
7
|
+
const tryToFix = (fix, {path, position, options}) => {
|
|
8
|
+
const [e] = tryCatch(fix, path, {options});
|
|
9
9
|
|
|
10
10
|
if (!e)
|
|
11
11
|
return;
|
|
@@ -15,7 +15,7 @@ const tryToFix = (fix, {path, position}) => {
|
|
|
15
15
|
throw e;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
module.exports = (is, fix, {path, rule, position}) => {
|
|
18
|
+
module.exports = (is, fix, {path, rule, position, options}) => {
|
|
19
19
|
if (!is)
|
|
20
20
|
return;
|
|
21
21
|
|
|
@@ -24,6 +24,7 @@ module.exports = (is, fix, {path, rule, position}) => {
|
|
|
24
24
|
tryToFix(fix, {
|
|
25
25
|
path,
|
|
26
26
|
position,
|
|
27
|
+
options,
|
|
27
28
|
});
|
|
28
29
|
};
|
|
29
30
|
|
package/package.json
CHANGED