@putout/plugin-putout-config 6.2.0 → 6.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 +28 -0
- package/lib/apply-conditions/index.js +8 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
13
13
|
|
|
14
14
|
## Rules
|
|
15
15
|
|
|
16
|
+
- ✅ [apply-conditions][#apply-conditions];
|
|
16
17
|
- ✅ [apply-labels][#apply-labels];
|
|
17
18
|
- ✅ [apply-nodejs][#apply-nodejs];
|
|
18
19
|
- ✅ [apply-tape][#apply-tape];
|
|
@@ -26,6 +27,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
26
27
|
```json
|
|
27
28
|
{
|
|
28
29
|
"rules": {
|
|
30
|
+
"putout-config/apply-conditions": "on",
|
|
29
31
|
"putout-config/apply-labels": "on",
|
|
30
32
|
"putout-config/apply-nodejs": "on",
|
|
31
33
|
"putout-config/convert-boolean-to-string": "on",
|
|
@@ -35,6 +37,32 @@ npm i @putout/plugin-putout-config -D
|
|
|
35
37
|
}
|
|
36
38
|
```
|
|
37
39
|
|
|
40
|
+
## apply-conditions
|
|
41
|
+
|
|
42
|
+
Apply [`conditions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-conditions#readme) according to 🐊[**Putout v32**](https://github.com/coderaiser/putout/releases/tag/v32.0.0).
|
|
43
|
+
|
|
44
|
+
### ❌ Example of incorrect code
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"rules": {
|
|
49
|
+
"remove-useless-else": "off",
|
|
50
|
+
"merge-if-statements": "off"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### ✅ Example of correct code
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"rules": {
|
|
60
|
+
"conditions/remove-useless-else": "off",
|
|
61
|
+
"conditions/merge-if-statements": "off"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
38
66
|
## apply-labels
|
|
39
67
|
|
|
40
68
|
Apply [`labels`](https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme) according to 🐊[**Putout v36**](https://github.com/coderaiser/putout/releases/tag/v36.0.0). Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9a3493fedfafdb25e86cf76af69dd003/8678f3b271ee6f6d13bceeedbe3b143f34be9f55).
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const applyConditions = require('./apply-conditions');
|
|
3
4
|
const applyLabels = require('./apply-labels');
|
|
4
5
|
const applyNodejs = require('./apply-nodejs');
|
|
5
6
|
const applyTape = require('./apply-tape');
|
|
@@ -8,6 +9,7 @@ const removeEmpty = require('./remove-empty');
|
|
|
8
9
|
const MoveFormatterUp = require('./move-formatter-up');
|
|
9
10
|
|
|
10
11
|
module.exports.rules = {
|
|
12
|
+
'apply-conditions': applyConditions,
|
|
11
13
|
'apply-labels': applyLabels,
|
|
12
14
|
'apply-nodejs': applyNodejs,
|
|
13
15
|
'apply-tape': applyTape,
|
package/package.json
CHANGED