@putout/plugin-putout-config 11.11.0 β†’ 11.13.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
@@ -1,7 +1,7 @@
1
1
  # @putout/plugin-putout-config [![NPM version][NPMIMGURL]][NPMURL]
2
2
 
3
3
  [NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-putout-config.svg?style=flat&longCache=true
4
- [NPMURL]: https://npmjs.org/package/@putout/plugin-putout-config"npm"
4
+ [NPMURL]: https://npmjs.org/package/@putout/plugin-putout-config "npm"
5
5
 
6
6
  🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with 🐊[**Putout Config**](https://github.com/coderaiser/putout#-configuration).
7
7
 
@@ -116,6 +116,16 @@ Apply [`return`](https://github.com/coderaiser/putout/tree/master/packages/plugi
116
116
 
117
117
  Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-esm#readme) according to:
118
118
 
119
+ - 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
120
+
121
+ ```diff
122
+ {
123
+ "rules": {
124
+ - "esm/add-index-to-import": "on"
125
+ }
126
+ }
127
+ ```
128
+
119
129
  - 🐊[**Putout v40**](https://github.com/coderaiser/putout/releases/tag/v40.0.0):
120
130
 
121
131
  ```diff
@@ -163,16 +173,18 @@ Apply [`arguments`](https://github.com/coderaiser/putout/tree/master/packages/pl
163
173
  "rules": {
164
174
  - "remove-useless-arguments": "off",
165
175
  - "remove-useless-arguments/arguments": "on",
176
+ - "convert-expression-to-params": "on",
166
177
  - "remove-useless-arguments/method": "on",
167
178
  - "remove-useless-arguments/unused": "on",
168
179
  - "remove-useless-arguments/json-parse": "on"
169
180
  - "convert-arguments-to-rest": "off"
170
181
  + "arguments": "off",
182
+ + "arguments/apply-json-parse": "on",
183
+ + "arguments/apply-rest": "on",
184
+ + "arguments/convert-expression-to-arguments": "on",
171
185
  + "arguments/remove-useless": "on",
172
186
  + "arguments/remove-useless-from-method": "on",
173
- + "arguments/remove-unused": "on",
174
- + "arguments/apply-json-parse": "on",
175
- + "arguments/apply-rest": "on"
187
+ + "arguments/remove-unused": "on"
176
188
  }
177
189
  }
178
190
  ```
@@ -7,6 +7,7 @@ const v41 = [
7
7
  ['remove-useless-arguments/unused', 'arguments/remove-unused'],
8
8
  ['remove-useless-arguments/json-parse', 'apply-json-parse'],
9
9
  ['convert-arguments-to-rest', 'arguments/apply-rest'],
10
+ ['convert-expression-to-params', 'arguments/convert-expression-to-arguments'],
10
11
  ];
11
12
 
12
13
  const versions = [...v41];
@@ -1,5 +1,9 @@
1
1
  import {createRenameProperty} from '../rename-property.js';
2
2
 
3
+ const v41 = [
4
+ ['esm/apply-index-to-import', ''],
5
+ ];
6
+
3
7
  const v40 = [
4
8
  ['putout/apply-index-to-import', 'esm/apply-index-to-import'],
5
9
  ];
@@ -18,6 +22,7 @@ const v37 = [
18
22
  const versions = [
19
23
  ...v37,
20
24
  ...v40,
25
+ ...v41,
21
26
  ];
22
27
 
23
28
  export const {
@@ -4,6 +4,7 @@ const {
4
4
  traverseProperties,
5
5
  __json,
6
6
  setLiteralValue,
7
+ remove,
7
8
  } = operator;
8
9
 
9
10
  export const createRenameProperty = (tuples) => ({
@@ -15,6 +16,11 @@ export const createRenameProperty = (tuples) => ({
15
16
  const report = ({from, to}) => `Rename property: '${from}' -> '${to}'`;
16
17
 
17
18
  const fix = ({path, to}) => {
19
+ if (!to) {
20
+ remove(path.parentPath.parentPath);
21
+ return;
22
+ }
23
+
18
24
  setLiteralValue(path.node.key, to);
19
25
  };
20
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "11.11.0",
3
+ "version": "11.13.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps to maintain putout config",
@@ -31,13 +31,13 @@
31
31
  "config"
32
32
  ],
33
33
  "devDependencies": {
34
- "@putout/eslint-flat": "^3.0.0",
35
- "@putout/test": "^14.0.0",
34
+ "@putout/eslint-flat": "^4.0.0",
35
+ "@putout/test": "^15.0.0",
36
36
  "c8": "^10.0.0",
37
37
  "eslint": "^10.0.0-alpha.0",
38
38
  "eslint-plugin-n": "^17.0.0",
39
- "eslint-plugin-putout": "^29.0.0",
40
- "madrun": "^11.0.0",
39
+ "eslint-plugin-putout": "^30.0.0",
40
+ "madrun": "^12.0.0",
41
41
  "nodemon": "^3.0.1"
42
42
  },
43
43
  "peerDependencies": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "license": "MIT",
47
47
  "engines": {
48
- "node": ">=20"
48
+ "node": ">=22"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"