@putout/plugin-putout-config 10.0.0 → 11.1.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 +31 -0
- package/lib/apply-assignment/index.js +1 -7
- package/lib/apply-conditions/index.js +1 -7
- package/lib/apply-destructuring/index.js +20 -0
- package/lib/apply-esm/index.js +1 -7
- package/lib/apply-for-of/index.js +1 -7
- package/lib/apply-labels/index.js +1 -7
- package/lib/apply-math/index.js +1 -7
- package/lib/apply-nodejs/index.js +1 -7
- package/lib/apply-optional-chaining/index.js +1 -7
- package/lib/apply-parens/index.js +1 -7
- package/lib/apply-promises/index.js +1 -7
- package/lib/apply-return/index.js +1 -7
- package/lib/apply-tape/index.js +1 -7
- package/lib/apply-types/index.js +1 -7
- package/lib/rename-rules/index.js +1 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
15
15
|
|
|
16
16
|
- ✅ [apply-assignment](#apply-assignment);
|
|
17
17
|
- ✅ [apply-conditions](#apply-conditions);
|
|
18
|
+
- ✅ [apply-destructuring](#apply-destructuring);
|
|
18
19
|
- ✅ [apply-esm](#apply-esm);
|
|
19
20
|
- ✅ [apply-return](#apply-return);
|
|
20
21
|
- ✅ [apply-parens](#apply-parens);
|
|
@@ -40,6 +41,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
40
41
|
"rules": {
|
|
41
42
|
"putout-config/apply-assignment": "on",
|
|
42
43
|
"putout-config/apply-conditions": "on",
|
|
44
|
+
"putout-config/apply-destructuring": "on",
|
|
43
45
|
"putout-config/apply-esm": "on",
|
|
44
46
|
"putout-config/apply-for-of": "on",
|
|
45
47
|
"putout-config/apply-labels": "on",
|
|
@@ -144,6 +146,35 @@ Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-e
|
|
|
144
146
|
}
|
|
145
147
|
```
|
|
146
148
|
|
|
149
|
+
## apply-destructuring
|
|
150
|
+
|
|
151
|
+
Apply [`destructuring`](https://github.com/coderaiser/putout/tree/master/packages/plugin-destructuring#readme) according to:
|
|
152
|
+
|
|
153
|
+
- 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
|
|
154
|
+
|
|
155
|
+
```diff
|
|
156
|
+
{
|
|
157
|
+
"rules": {
|
|
158
|
+
- "apply-destructuring": "off",
|
|
159
|
+
- "apply-destructuring/falsy": "off",
|
|
160
|
+
- "apply-destructuring/array": "off",
|
|
161
|
+
- "apply-destructuring/object": "off",
|
|
162
|
+
- "split-call-with-destructuring": "off",
|
|
163
|
+
- "merge-destructuring-properties": "off",
|
|
164
|
+
- "split-nested-destructuring": "off"
|
|
165
|
+
- "remove-useless-arguments/destructuring": "off"
|
|
166
|
+
+ "destructuring": "off",
|
|
167
|
+
+ "destructuring/remove-useless-object": "off",
|
|
168
|
+
+ "destructuring/apply-array": "off",
|
|
169
|
+
+ "destructuring/apply-object": "off",
|
|
170
|
+
+ "destructuring/split-call": "off",
|
|
171
|
+
+ "destructuring/merge-properties": "off",
|
|
172
|
+
+ "destructuring/split-nested": "off",
|
|
173
|
+
+ "destructuring/remove-useless-arguments": "off"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
147
178
|
## apply-parens
|
|
148
179
|
|
|
149
180
|
Apply [`parens`](https://github.com/coderaiser/putout/tree/master/packages/plugin-parens#readme) according to:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {createRenameProperty} from '../rename-property.js';
|
|
2
|
+
|
|
3
|
+
const v41 = [
|
|
4
|
+
['apply-destructuring', 'destructuring'],
|
|
5
|
+
['apply-destructuring/object', 'destructuring/apply-object'],
|
|
6
|
+
['apply-destructuring/array', 'destructuring/apply-array'],
|
|
7
|
+
['apply-destructuring/falsy', 'destructuring/remove-useless-object'],
|
|
8
|
+
['merge-destructuring-properties', 'destructuring/merge-properties'],
|
|
9
|
+
['split-call-with-destructuring', 'destructuring/split-call'],
|
|
10
|
+
['split-nested-destructuring', 'destructuring/split-nested'],
|
|
11
|
+
['remove-useless-arguments/destructuring', 'destructuring/remove-useless-arguments'],
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const versions = [...v41];
|
|
15
|
+
|
|
16
|
+
export const {
|
|
17
|
+
report,
|
|
18
|
+
fix,
|
|
19
|
+
traverse,
|
|
20
|
+
} = createRenameProperty(versions);
|
package/lib/apply-esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
@@ -15,9 +15,3 @@ const {
|
|
|
15
15
|
['remove-useless-array-from', 'for-of/remove-useless-array-from'],
|
|
16
16
|
['remove-useless-variables/for-of', 'for-of/remove-useless-variables"'],
|
|
17
17
|
]);
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
report,
|
|
21
|
-
fix,
|
|
22
|
-
traverse,
|
|
23
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
@@ -8,9 +8,3 @@ const {
|
|
|
8
8
|
['remove-unused-labels', 'labels/remove-unused'],
|
|
9
9
|
['convert-label-to-object', 'labels/convert-to-object'],
|
|
10
10
|
]);
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
report,
|
|
14
|
-
fix,
|
|
15
|
-
traverse,
|
|
16
|
-
};
|
package/lib/apply-math/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
@@ -10,9 +10,3 @@ const {
|
|
|
10
10
|
['convert-imul-to-multiplication', 'math/apply-multiplication'],
|
|
11
11
|
['convert-sqrt-to-hypot', 'math/convert-sqrt-to-hypot'],
|
|
12
12
|
]);
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
report,
|
|
16
|
-
fix,
|
|
17
|
-
traverse,
|
|
18
|
-
};
|
|
@@ -5,7 +5,7 @@ const v24 = [
|
|
|
5
5
|
['convert-top-level-return', 'nodejs/convert-top-level-return'],
|
|
6
6
|
];
|
|
7
7
|
|
|
8
|
-
const {
|
|
8
|
+
export const {
|
|
9
9
|
report,
|
|
10
10
|
fix,
|
|
11
11
|
traverse,
|
|
@@ -16,9 +16,3 @@ const {
|
|
|
16
16
|
['convert-esm-to-commonjs', 'nodejs/convert-esm-to-commonjs'],
|
|
17
17
|
['convert-commonjs-to-esm', 'nodejs/convert-commonjs-to-esm'],
|
|
18
18
|
]);
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
report,
|
|
22
|
-
fix,
|
|
23
|
-
traverse,
|
|
24
|
-
};
|
|
@@ -7,14 +7,8 @@ const v37 = [
|
|
|
7
7
|
['apply-optional-chaining/use', 'optional-chaining/convert-logical-to-optional'],
|
|
8
8
|
];
|
|
9
9
|
|
|
10
|
-
const {
|
|
10
|
+
export const {
|
|
11
11
|
report,
|
|
12
12
|
fix,
|
|
13
13
|
traverse,
|
|
14
14
|
} = createRenameProperty(v37);
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
report,
|
|
18
|
-
fix,
|
|
19
|
-
traverse,
|
|
20
|
-
};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
7
7
|
} = createRenameProperty([
|
|
8
8
|
['remove-useless-variables/await', 'promises/remove-useless-variables'],
|
|
9
9
|
]);
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
report,
|
|
13
|
-
fix,
|
|
14
|
-
traverse,
|
|
15
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
@@ -10,9 +10,3 @@ const {
|
|
|
10
10
|
['simplify-boolean-return', 'return/simplify-boolean'],
|
|
11
11
|
['convert-break-to-return', 'return/convert-from-break'],
|
|
12
12
|
]);
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
report,
|
|
16
|
-
fix,
|
|
17
|
-
traverse,
|
|
18
|
-
};
|
package/lib/apply-tape/index.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
7
7
|
} = createRenameProperty([
|
|
8
8
|
['convert-mock-require-to-mock-import', 'tape/convert-mock-require-to-mock-import'],
|
|
9
9
|
]);
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
report,
|
|
13
|
-
fix,
|
|
14
|
-
traverse,
|
|
15
|
-
};
|
package/lib/apply-types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createRenameProperty} from '../rename-property.js';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
export const {
|
|
4
4
|
report,
|
|
5
5
|
fix,
|
|
6
6
|
traverse,
|
|
@@ -11,9 +11,3 @@ const {
|
|
|
11
11
|
['apply-is-array', 'types/apply-is-array'],
|
|
12
12
|
['remove-useless-type-conversion/with-double-negations', 'types/remove-double-negations'],
|
|
13
13
|
]);
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
report,
|
|
17
|
-
fix,
|
|
18
|
-
traverse,
|
|
19
|
-
};
|
|
@@ -11,7 +11,7 @@ const v26 = [
|
|
|
11
11
|
['strict-mode/remove', 'strict-mode/remove-useless'],
|
|
12
12
|
];
|
|
13
13
|
|
|
14
|
-
const {
|
|
14
|
+
export const {
|
|
15
15
|
report,
|
|
16
16
|
fix,
|
|
17
17
|
traverse,
|
|
@@ -19,9 +19,3 @@ const {
|
|
|
19
19
|
...v29,
|
|
20
20
|
...v26,
|
|
21
21
|
]);
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
report,
|
|
25
|
-
fix,
|
|
26
|
-
traverse,
|
|
27
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.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",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@putout/eslint-flat": "^3.0.0",
|
|
35
|
-
"@putout/test": "^
|
|
35
|
+
"@putout/test": "^14.0.0",
|
|
36
36
|
"c8": "^10.0.0",
|
|
37
|
-
"eslint": "
|
|
37
|
+
"eslint": "v10.0.0-alpha.0",
|
|
38
38
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
39
|
+
"eslint-plugin-putout": "^29.0.0",
|
|
40
40
|
"madrun": "^11.0.0",
|
|
41
41
|
"nodemon": "^3.0.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"putout": ">=
|
|
44
|
+
"putout": ">=41"
|
|
45
45
|
},
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"engines": {
|