@putout/plugin-putout-config 12.0.0 → 12.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/lib/apply-arguments/index.js +3 -2
- package/lib/apply-assignment/index.js +3 -2
- package/lib/apply-conditions/index.js +3 -2
- package/lib/apply-destructuring/index.js +3 -2
- package/lib/apply-esm/index.js +3 -2
- package/lib/apply-filesystem/index.js +4 -2
- package/lib/apply-for-of/index.js +4 -2
- package/lib/apply-labels/index.js +4 -2
- package/lib/apply-math/index.js +4 -2
- package/lib/apply-nodejs/index.js +3 -2
- package/lib/apply-optional-chaining/index.js +3 -2
- package/lib/apply-parens/index.js +3 -2
- package/lib/apply-promises/index.js +4 -2
- package/lib/apply-return/index.js +4 -2
- package/lib/apply-spread/index.js +3 -2
- package/lib/apply-tape/index.js +4 -2
- package/lib/apply-types/index.js +4 -2
- package/lib/apply-variables/index.js +3 -2
- package/lib/rename-rules/index.js +3 -2
- package/package.json +3 -3
- package/lib/rename-property.js +0 -39
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v41 = [
|
|
4
5
|
['remove-useless-arguments', 'arguments'],
|
|
5
6
|
['remove-useless-arguments/arguments', 'arguments/remove-useless'],
|
|
@@ -16,4 +17,4 @@ export const {
|
|
|
16
17
|
report,
|
|
17
18
|
fix,
|
|
18
19
|
traverse,
|
|
19
|
-
} =
|
|
20
|
+
} = renameProperties(versions);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v39 = [
|
|
4
5
|
['split-assignment-expressions', 'assignment/split'],
|
|
5
6
|
['simplify-assignments', 'assignment/simplify'],
|
|
@@ -12,4 +13,4 @@ export const {
|
|
|
12
13
|
report,
|
|
13
14
|
fix,
|
|
14
15
|
traverse,
|
|
15
|
-
} =
|
|
16
|
+
} = renameProperties(v39);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v32 = [
|
|
4
5
|
['remove-useless-else', 'conditions/remove-useless-else'],
|
|
5
6
|
['merge-if-statements', 'conditions/merge-if-statements'],
|
|
@@ -26,4 +27,4 @@ export const {
|
|
|
26
27
|
report,
|
|
27
28
|
fix,
|
|
28
29
|
traverse,
|
|
29
|
-
} =
|
|
30
|
+
} = renameProperties(versions);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v41 = [
|
|
4
5
|
['apply-destructuring', 'destructuring'],
|
|
5
6
|
['apply-destructuring/object', 'destructuring/apply-object'],
|
|
@@ -22,4 +23,4 @@ export const {
|
|
|
22
23
|
report,
|
|
23
24
|
fix,
|
|
24
25
|
traverse,
|
|
25
|
-
} =
|
|
26
|
+
} = renameProperties(versions);
|
package/lib/apply-esm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v41 = [
|
|
4
5
|
['esm/apply-index-to-import', ''],
|
|
5
6
|
];
|
|
@@ -29,4 +30,4 @@ export const {
|
|
|
29
30
|
report,
|
|
30
31
|
fix,
|
|
31
32
|
traverse,
|
|
32
|
-
} =
|
|
33
|
+
} = renameProperties(versions);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['filesystem/remove-travis-yml', 'filesystem/remove-file'],
|
|
9
11
|
['filesystem/remove-vim-swap-file', 'filesystem/remove-file'],
|
|
10
12
|
['filesystem/remove-nyc-output-file', 'filesystem/remove-file'],
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['convert-for-to-for-of', 'for-of/for'],
|
|
9
11
|
['convert-for-each-to-for-of', 'for-of/for-each'],
|
|
10
12
|
['convert-for-in-to-for-of', 'for-of/for-in'],
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['remove-unused-labels', 'labels/remove-unused'],
|
|
9
11
|
['convert-label-to-object', 'labels/convert-to-object'],
|
|
10
12
|
]);
|
package/lib/apply-math/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['convert-math-pow', 'math/apply-exponential'],
|
|
9
11
|
['apply-numeric-separators', 'math/apply-numeric-separators'],
|
|
10
12
|
['convert-imul-to-multiplication', 'math/apply-multiplication'],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v24 = [
|
|
4
5
|
['remove-process-exit', 'nodejs/remove-process-exit'],
|
|
5
6
|
['convert-top-level-return', 'nodejs/convert-top-level-return'],
|
|
@@ -9,7 +10,7 @@ export const {
|
|
|
9
10
|
report,
|
|
10
11
|
fix,
|
|
11
12
|
traverse,
|
|
12
|
-
} =
|
|
13
|
+
} = renameProperties([
|
|
13
14
|
...v24,
|
|
14
15
|
['strict-mode/add-missing', 'nodejs/add-missing-strict-mode'],
|
|
15
16
|
['strict-mode/remove-useless', 'nodejs/remove-useless-strict-mode'],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v37 = [
|
|
4
5
|
['convert-optional-to-logical/assign', 'optional-chaining/convert-optional-assign-to-logical'],
|
|
5
6
|
['convert-optional-to-logical/call', 'optional-chaining/convert-optional-to-logical'],
|
|
@@ -11,4 +12,4 @@ export const {
|
|
|
11
12
|
report,
|
|
12
13
|
fix,
|
|
13
14
|
traverse,
|
|
14
|
-
} =
|
|
15
|
+
} = renameProperties(v37);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v37 = [
|
|
4
5
|
['add-missing-parens', 'parens/add-missing'],
|
|
5
6
|
];
|
|
@@ -8,4 +9,4 @@ export const {
|
|
|
8
9
|
report,
|
|
9
10
|
fix,
|
|
10
11
|
traverse,
|
|
11
|
-
} =
|
|
12
|
+
} = renameProperties(v37);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['remove-useless-variables/await', 'promises/remove-useless-variables'],
|
|
9
11
|
]);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['apply-early-return', 'return/apply-early'],
|
|
9
11
|
['remove-useless-return', 'return/remove-useless'],
|
|
10
12
|
['simplify-boolean-return', 'return/simplify-boolean'],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v41 = [
|
|
4
5
|
['remove-useless-spread', 'spread'],
|
|
5
6
|
['remove-useless-spread/nested', 'spread/simplify-nested'],
|
|
@@ -15,4 +16,4 @@ export const {
|
|
|
15
16
|
report,
|
|
16
17
|
fix,
|
|
17
18
|
traverse,
|
|
18
|
-
} =
|
|
19
|
+
} = renameProperties(versions);
|
package/lib/apply-tape/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['convert-mock-require-to-mock-import', 'tape/convert-mock-require-to-mock-import'],
|
|
9
11
|
]);
|
package/lib/apply-types/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {renameProperties} = operator;
|
|
2
4
|
|
|
3
5
|
export const {
|
|
4
6
|
report,
|
|
5
7
|
fix,
|
|
6
8
|
traverse,
|
|
7
|
-
} =
|
|
9
|
+
} = renameProperties([
|
|
8
10
|
['convert-typeof-to-is-type', 'types/convert-typeof-to-is-type'],
|
|
9
11
|
['remove-useless-type-conversions', 'types/remove-useless-type-conversions'],
|
|
10
12
|
['remove-useless-typeof', 'types/remove-useless-typeof'],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v41 = [
|
|
4
5
|
['remove-useless-variables', 'variables'],
|
|
5
6
|
['remove-useless-variables/remove', 'variables/remove-useless'],
|
|
@@ -21,4 +22,4 @@ export const {
|
|
|
21
22
|
report,
|
|
22
23
|
fix,
|
|
23
24
|
traverse,
|
|
24
|
-
} =
|
|
25
|
+
} = renameProperties(versions);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
+
const {renameProperties} = operator;
|
|
3
4
|
const v29 = [
|
|
4
5
|
['declare-undefined-variables', 'declare'],
|
|
5
6
|
['apply-array-at', 'array-at'],
|
|
@@ -15,7 +16,7 @@ export const {
|
|
|
15
16
|
report,
|
|
16
17
|
fix,
|
|
17
18
|
traverse,
|
|
18
|
-
} =
|
|
19
|
+
} = renameProperties([
|
|
19
20
|
...v29,
|
|
20
21
|
...v26,
|
|
21
22
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout-config",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.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",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"c8": "^10.0.0",
|
|
37
37
|
"eslint": "^10.0.0",
|
|
38
38
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
40
|
-
"madrun": "^
|
|
39
|
+
"eslint-plugin-putout": "^31.0.0",
|
|
40
|
+
"madrun": "^13.0.0",
|
|
41
41
|
"nodemon": "^3.0.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/lib/rename-property.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {operator} from 'putout';
|
|
2
|
-
|
|
3
|
-
const {
|
|
4
|
-
traverseProperties,
|
|
5
|
-
__json,
|
|
6
|
-
setLiteralValue,
|
|
7
|
-
remove,
|
|
8
|
-
} = operator;
|
|
9
|
-
|
|
10
|
-
export const createRenameProperty = (tuples) => ({
|
|
11
|
-
report,
|
|
12
|
-
fix,
|
|
13
|
-
traverse: createTraverse(tuples),
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const report = ({from, to}) => `Rename property: '${from}' -> '${to}'`;
|
|
17
|
-
|
|
18
|
-
const fix = ({path, to}) => {
|
|
19
|
-
if (!to) {
|
|
20
|
-
remove(path.parentPath.parentPath);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
setLiteralValue(path.node.key, to);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const createTraverse = (tuples) => ({push}) => ({
|
|
28
|
-
[__json](mainPath) {
|
|
29
|
-
for (const [from, to] of tuples) {
|
|
30
|
-
for (const path of traverseProperties(mainPath, from)) {
|
|
31
|
-
push({
|
|
32
|
-
path,
|
|
33
|
-
from,
|
|
34
|
-
to,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
});
|