@putout/plugin-putout-config 6.1.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,8 +13,10 @@ 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];
19
+ - ✅ [apply-tape][#apply-tape];
18
20
  - ✅ [convert-boolean-to-string][#convert-boolean-to-string];
19
21
  - ✅ [move-formatter-up][#move-formatter-up];
20
22
  - ✅ [remove-empty][#remove-empty];
@@ -25,6 +27,7 @@ npm i @putout/plugin-putout-config -D
25
27
  ```json
26
28
  {
27
29
  "rules": {
30
+ "putout-config/apply-conditions": "on",
28
31
  "putout-config/apply-labels": "on",
29
32
  "putout-config/apply-nodejs": "on",
30
33
  "putout-config/convert-boolean-to-string": "on",
@@ -34,6 +37,32 @@ npm i @putout/plugin-putout-config -D
34
37
  }
35
38
  ```
36
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
+
37
66
  ## apply-labels
38
67
 
39
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).
@@ -62,7 +91,10 @@ Apply [`labels`](https://github.com/coderaiser/putout/tree/master/packages/plugi
62
91
 
63
92
  ## apply-nodejs
64
93
 
65
- Apply [`nodejs`](https://github.com/coderaiser/putout/tree/master/packages/plugin-nodejs#readme) according to 🐊[**Putout v34**](https://github.com/coderaiser/putout/releases/tag/v34.0.0).
94
+ Apply [`nodejs`](https://github.com/coderaiser/putout/tree/master/packages/plugin-nodejs#readme) according to:
95
+
96
+ - 🐊[**Putout v33**](https://github.com/coderaiser/putout/releases/tag/v33.0.0);
97
+ - 🐊[**Putout v34**](https://github.com/coderaiser/putout/releases/tag/v34.0.0);
66
98
 
67
99
  ### ❌ Example of incorrect code
68
100
 
@@ -70,7 +102,9 @@ Apply [`nodejs`](https://github.com/coderaiser/putout/tree/master/packages/plugi
70
102
  {
71
103
  "rules": {
72
104
  "strict-mode/add-missing": "off",
73
- "strict-mode/remove-useless": "off"
105
+ "strict-mode/remove-useless": "off",
106
+ "convert-esm-to-commonjs": "off",
107
+ "convert-commonjs-to-esm": "off"
74
108
  }
75
109
  }
76
110
  ```
@@ -81,7 +115,35 @@ Apply [`nodejs`](https://github.com/coderaiser/putout/tree/master/packages/plugi
81
115
  {
82
116
  "rules": {
83
117
  "nodejs/add-missing-strict-mode": "off",
84
- "nodejs/remove-useless-strict-mode": "off"
118
+ "nodejs/remove-useless-strict-mode": "off",
119
+ "nodejs/convert-esm-to-commonjs": "off",
120
+ "nodejs/convert-commonjs-to-esm": "off"
121
+ }
122
+ }
123
+ ```
124
+
125
+ ## apply-tape
126
+
127
+ Apply [`tape`](https://github.com/coderaiser/putout/tree/master/packages/plugin-tape#readme) according to:
128
+
129
+ - 🐊[**Putout v33**](https://github.com/coderaiser/putout/releases/tag/v33.0.0);
130
+
131
+ ### ❌ Example of incorrect code
132
+
133
+ ```json
134
+ {
135
+ "rules": {
136
+ "convert-mock-require-to-mock-import": "off"
137
+ }
138
+ }
139
+ ```
140
+
141
+ ### ✅ Example of correct code
142
+
143
+ ```json
144
+ {
145
+ "rules": {
146
+ "tape/convert-mock-require-to-mock-import": "off"
85
147
  }
86
148
  }
87
149
  ```
@@ -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
+ ]);
@@ -5,4 +5,6 @@ const {createRenameProperty} = require('../rename-property');
5
5
  module.exports = createRenameProperty([
6
6
  ['strict-mode/add-missing', 'nodejs/add-missing-strict-mode'],
7
7
  ['strict-mode/remove-useless', 'nodejs/remove-useless-strict-mode'],
8
+ ['convert-esm-to-commonjs', 'nodejs/convert-esm-to-commonjs'],
9
+ ['convert-commonjs-to-esm', 'nodejs/convert-commonjs-to-esm'],
8
10
  ]);
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ const {createRenameProperty} = require('../rename-property');
4
+
5
+ module.exports = createRenameProperty([
6
+ ['convert-mock-require-to-mock-import', 'tape/convert-mock-require-to-mock-import'],
7
+ ]);
package/lib/index.js CHANGED
@@ -1,14 +1,18 @@
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');
6
+ const applyTape = require('./apply-tape');
5
7
  const convertBooleanToString = require('./convert-boolean-to-string');
6
8
  const removeEmpty = require('./remove-empty');
7
9
  const MoveFormatterUp = require('./move-formatter-up');
8
10
 
9
11
  module.exports.rules = {
12
+ 'apply-conditions': applyConditions,
10
13
  'apply-labels': applyLabels,
11
14
  'apply-nodejs': applyNodejs,
15
+ 'apply-tape': applyTape,
12
16
  'convert-boolean-to-string': convertBooleanToString,
13
17
  'move-formatter-up': MoveFormatterUp,
14
18
  'remove-empty': removeEmpty,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "6.1.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",