@putout/plugin-putout-config 7.1.0 → 7.3.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 +19 -0
- package/lib/apply-esm/index.js +15 -0
- package/lib/apply-parens/index.js +9 -0
- package/lib/index.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
15
15
|
|
|
16
16
|
- ✅ [apply-conditions](#apply-conditions);
|
|
17
17
|
- ✅ [apply-esm](#apply-esm);
|
|
18
|
+
- ✅ [apply-parens](#apply-parens);
|
|
18
19
|
- ✅ [apply-for-of](#apply-for-of);
|
|
19
20
|
- ✅ [apply-labels](#apply-labels);
|
|
20
21
|
- ✅ [apply-math](#apply-math);
|
|
@@ -42,6 +43,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
42
43
|
"putout-config/apply-math": "on",
|
|
43
44
|
"putout-config/apply-nodejs": "on",
|
|
44
45
|
"putout-config/apply-optional-chaining": "on",
|
|
46
|
+
"putout-config/apply-parens": "on",
|
|
45
47
|
"putout-config/apply-tape": "on",
|
|
46
48
|
"putout-config/apply-types": "on",
|
|
47
49
|
"putout-config/apply-promises": "on",
|
|
@@ -67,10 +69,12 @@ Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-e
|
|
|
67
69
|
- "remove-empty/export": "on",
|
|
68
70
|
+ "esm/remove-empty-import": "on",
|
|
69
71
|
+ "esm/remove-empty-export": "on",
|
|
72
|
+
- "convert-assert-to-with": "off",
|
|
70
73
|
- "group-imports-by-source": "on",
|
|
71
74
|
- "declare-imports-first": "on",
|
|
72
75
|
- "remove-quotes-from-import-assertions": "on",
|
|
73
76
|
- "merge-duplicate-imports": "on"
|
|
77
|
+
+ "esm/convert-assert-to-with": "off",
|
|
74
78
|
+ "esm/group-imports-by-source": "on",
|
|
75
79
|
+ "esm/declare-imports-first": "on",
|
|
76
80
|
+ "esm/remove-quotes-from-import-assertions": "on",
|
|
@@ -79,6 +83,21 @@ Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-e
|
|
|
79
83
|
}
|
|
80
84
|
```
|
|
81
85
|
|
|
86
|
+
## apply-parens
|
|
87
|
+
|
|
88
|
+
Apply [`parens`](https://github.com/coderaiser/putout/tree/master/packages/plugin-parens#readme) according to:
|
|
89
|
+
|
|
90
|
+
- 🐊[**Putout v37**](https://github.com/coderaiser/putout/releases/tag/v37.0.0):
|
|
91
|
+
|
|
92
|
+
```diff
|
|
93
|
+
{
|
|
94
|
+
"rules": {
|
|
95
|
+
- "add-missing-parens": "on"
|
|
96
|
+
+ "parens/add-missing": "on"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
82
101
|
## apply-optional-chaining
|
|
83
102
|
|
|
84
103
|
Apply [`optional-chaining`](https://github.com/coderaiser/putout/tree/master/packages/plugin-optional-chaining#readme) according to:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {createRenameProperty} = require('../rename-property');
|
|
4
|
+
|
|
5
|
+
const v37 = [
|
|
6
|
+
['convert-assert-to-with', 'esm/convert-assert-to-with'],
|
|
7
|
+
['remove-empty/import', 'esm/remove-empty-import'],
|
|
8
|
+
['remove-empty/export', 'esm/remove-empty-export'],
|
|
9
|
+
['group-imports-by-source', 'esm/group-imports-by-source'],
|
|
10
|
+
['declare-imports-first', 'esm/declare-imports-first'],
|
|
11
|
+
['remove-quotes-from-import-assertions', 'esm/remove-quotes-from-import-assertions'],
|
|
12
|
+
['merge-duplicate-imports', 'esm/merge-duplicate-imports'],
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
module.exports = createRenameProperty(v37);
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const applyConditions = require('./apply-conditions');
|
|
4
|
+
const applyEsm = require('./apply-esm');
|
|
4
5
|
const applyOptionalChaining = require('./apply-optional-chaining');
|
|
6
|
+
const applyParens = require('./apply-parens');
|
|
5
7
|
const applyForOf = require('./apply-for-of');
|
|
6
8
|
const applyLabels = require('./apply-labels');
|
|
7
9
|
const applyMath = require('./apply-math');
|
|
@@ -17,11 +19,13 @@ const removeEmptyFile = require('./remove-empty-file');
|
|
|
17
19
|
|
|
18
20
|
module.exports.rules = {
|
|
19
21
|
'apply-conditions': applyConditions,
|
|
22
|
+
'apply-esm': applyEsm,
|
|
20
23
|
'apply-for-of': applyForOf,
|
|
21
24
|
'apply-labels': applyLabels,
|
|
22
25
|
'apply-math': applyMath,
|
|
23
26
|
'apply-nodejs': applyNodejs,
|
|
24
27
|
'apply-optional-chaining': applyOptionalChaining,
|
|
28
|
+
'apply-parens': applyParens,
|
|
25
29
|
'apply-promises': applyPromises,
|
|
26
30
|
'apply-tape': applyTape,
|
|
27
31
|
'apply-types': applyTypes,
|
package/package.json
CHANGED