@putout/plugin-putout 29.2.0 β†’ 29.2.2

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
@@ -2082,19 +2082,19 @@ const test = createTest(__dirname, {
2082
2082
 
2083
2083
  ## remove-useless-source-argument
2084
2084
 
2085
- Check it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9b5f94d6a60f3337f925fcc338370d83/0f47ee0e979ae4ea27007c2f9751a1376b36de01).
2085
+ Check it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9b5f94d6a60f3337f925fcc338370d83/7e944de0dfdd64b3c74d490aae21b04015b8262f).
2086
2086
 
2087
2087
  ### ❌ Example of incorrect code
2088
2088
 
2089
2089
  ```js
2090
2090
  import {tryCatch} from 'try-catch';
2091
2091
 
2092
- transform(ast, options);
2093
- findPlaces(ast, options);
2092
+ transform(ast, source, options);
2093
+ findPlaces(ast, source, options);
2094
2094
 
2095
- tryCatch(transform, ast, {});
2095
+ tryCatch(transform, ast, source {});
2096
2096
 
2097
- tryCatch(findPlaces, ast, resultOptions);
2097
+ tryCatch(findPlaces, ast, source, resultOptions);
2098
2098
  ```
2099
2099
 
2100
2100
  ### βœ… Example of correct code
@@ -2,13 +2,20 @@ import {operator} from 'putout';
2
2
 
3
3
  const {addArgs} = operator;
4
4
 
5
+ const INCLUDE = [
6
+ '(__a) => __body',
7
+ '() => __body',
8
+ ];
9
+
10
+ const EXCLUDE = [
11
+ 'export const filter = __a',
12
+ 'module.exports.filter = __a',
13
+ ];
14
+
5
15
  export const {
6
16
  report,
7
17
  fix,
8
18
  traverse,
9
19
  } = addArgs({
10
- path: ['vars, path', [
11
- '(__a) => __body',
12
- '() => __body',
13
- ]],
20
+ path: ['vars, path', INCLUDE, EXCLUDE],
14
21
  });
@@ -9,6 +9,7 @@ export const filter = (path) => !isObjectProperty(path.parentPath);
9
9
  export const replace = () => ({
10
10
  'findPlaces(__a, __b, __c)': 'findPlaces(__a, __c)',
11
11
  'transform(__a, __b, __c)': 'transform(__a, __c)',
12
+ 'transformAsync(__a, __b, __c)': 'transformAsync(__a, __c)',
12
13
  'tryCatch(transform, __a, __b, __c)': 'tryCatch(transform, __a, __c)',
13
14
  'tryCatch(findPlaces, __a, __b, __c)': 'tryCatch(findPlaces, __a, __c)',
14
15
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "29.2.0",
3
+ "version": "29.2.2",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",