@putout/plugin-putout-config 7.3.0 → 8.0.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 +23 -0
- package/lib/apply-return/index.js +10 -0
- package/lib/index.js +2 -0
- package/package.json +3 -4
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-return](#apply-return);
|
|
18
19
|
- ✅ [apply-parens](#apply-parens);
|
|
19
20
|
- ✅ [apply-for-of](#apply-for-of);
|
|
20
21
|
- ✅ [apply-labels](#apply-labels);
|
|
@@ -44,6 +45,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
44
45
|
"putout-config/apply-nodejs": "on",
|
|
45
46
|
"putout-config/apply-optional-chaining": "on",
|
|
46
47
|
"putout-config/apply-parens": "on",
|
|
48
|
+
"putout-config/apply-return": "on",
|
|
47
49
|
"putout-config/apply-tape": "on",
|
|
48
50
|
"putout-config/apply-types": "on",
|
|
49
51
|
"putout-config/apply-promises": "on",
|
|
@@ -56,6 +58,27 @@ npm i @putout/plugin-putout-config -D
|
|
|
56
58
|
}
|
|
57
59
|
```
|
|
58
60
|
|
|
61
|
+
## apply-return
|
|
62
|
+
|
|
63
|
+
Apply [`return`](https://github.com/coderaiser/putout/tree/master/packages/plugin-return#readme) according to:
|
|
64
|
+
|
|
65
|
+
- 🐊[**Putout v38**](https://github.com/coderaiser/putout/releases/tag/v38.0.0):
|
|
66
|
+
|
|
67
|
+
```diff
|
|
68
|
+
{
|
|
69
|
+
"rules": {
|
|
70
|
+
- "apply-early-return": "off",
|
|
71
|
+
+ "return/apply-early": "off",
|
|
72
|
+
- "simplify-boolean-return": "off",
|
|
73
|
+
+ "return/simplify-boolean": "off",
|
|
74
|
+
- "convert-break-to-return": "off",
|
|
75
|
+
+ "return/convert-from-break": "off"
|
|
76
|
+
- "remove-useless-return": "off"
|
|
77
|
+
+ "return/remove-useless": "off"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
59
82
|
## apply-esm
|
|
60
83
|
|
|
61
84
|
Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-esm#readme) according to:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {createRenameProperty} = require('../rename-property');
|
|
4
|
+
|
|
5
|
+
module.exports = createRenameProperty([
|
|
6
|
+
['apply-early-return', 'return/apply-early'],
|
|
7
|
+
['remove-useless-return', 'return/remove-useless'],
|
|
8
|
+
['simplify-boolean-return', 'return/simplify-boolean'],
|
|
9
|
+
['convert-break-to-return', 'return/convert-from-break'],
|
|
10
|
+
]);
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@ const applyConditions = require('./apply-conditions');
|
|
|
4
4
|
const applyEsm = require('./apply-esm');
|
|
5
5
|
const applyOptionalChaining = require('./apply-optional-chaining');
|
|
6
6
|
const applyParens = require('./apply-parens');
|
|
7
|
+
const applyReturn = require('./apply-return');
|
|
7
8
|
const applyForOf = require('./apply-for-of');
|
|
8
9
|
const applyLabels = require('./apply-labels');
|
|
9
10
|
const applyMath = require('./apply-math');
|
|
@@ -27,6 +28,7 @@ module.exports.rules = {
|
|
|
27
28
|
'apply-optional-chaining': applyOptionalChaining,
|
|
28
29
|
'apply-parens': applyParens,
|
|
29
30
|
'apply-promises': applyPromises,
|
|
31
|
+
'apply-return': applyReturn,
|
|
30
32
|
'apply-tape': applyTape,
|
|
31
33
|
'apply-types': applyTypes,
|
|
32
34
|
'convert-boolean-to-string': convertBooleanToString,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin helps to maintain putout config",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"putout",
|
|
29
29
|
"putout-plugin",
|
|
30
30
|
"plugin",
|
|
31
|
-
"putout",
|
|
32
31
|
"config"
|
|
33
32
|
],
|
|
34
33
|
"devDependencies": {
|
|
@@ -36,13 +35,13 @@
|
|
|
36
35
|
"c8": "^10.0.0",
|
|
37
36
|
"eslint": "^9.0.0",
|
|
38
37
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
38
|
+
"eslint-plugin-putout": "^24.0.0",
|
|
40
39
|
"lerna": "^6.0.1",
|
|
41
40
|
"madrun": "^10.0.0",
|
|
42
41
|
"nodemon": "^3.0.1"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
|
-
"putout": ">=
|
|
44
|
+
"putout": ">=38"
|
|
46
45
|
},
|
|
47
46
|
"license": "MIT",
|
|
48
47
|
"engines": {
|