@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 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).
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ const {createRenameProperty} = require('../rename-property');
4
+
5
+ module.exports = createRenameProperty([
6
+ ['remove-useless-else', 'conditions/remove-useless-else'],
7
+ ['merge-if-statements', 'conditions/merge-if-statements'],
8
+ ]);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "6.2.0",
3
+ "version": "6.3.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",