@putout/plugin-putout-config 6.0.0 → 6.1.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 +29 -1
- package/lib/apply-nodejs/index.js +8 -0
- package/lib/index.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
14
14
|
## Rules
|
|
15
15
|
|
|
16
16
|
- ✅ [apply-labels][#apply-labels];
|
|
17
|
+
- ✅ [apply-nodejs][#apply-nodejs];
|
|
17
18
|
- ✅ [convert-boolean-to-string][#convert-boolean-to-string];
|
|
18
19
|
- ✅ [move-formatter-up][#move-formatter-up];
|
|
19
20
|
- ✅ [remove-empty][#remove-empty];
|
|
@@ -25,6 +26,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
25
26
|
{
|
|
26
27
|
"rules": {
|
|
27
28
|
"putout-config/apply-labels": "on",
|
|
29
|
+
"putout-config/apply-nodejs": "on",
|
|
28
30
|
"putout-config/convert-boolean-to-string": "on",
|
|
29
31
|
"putout-config/move-formatter-up": "on",
|
|
30
32
|
"putout-config/remove-empty": "on"
|
|
@@ -34,7 +36,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
34
36
|
|
|
35
37
|
## apply-labels
|
|
36
38
|
|
|
37
|
-
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)
|
|
39
|
+
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).
|
|
38
40
|
|
|
39
41
|
### ❌ Example of incorrect code
|
|
40
42
|
|
|
@@ -58,6 +60,32 @@ Apply [`labels`](https://github.com/coderaiser/putout/tree/master/packages/plugi
|
|
|
58
60
|
}
|
|
59
61
|
```
|
|
60
62
|
|
|
63
|
+
## apply-nodejs
|
|
64
|
+
|
|
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).
|
|
66
|
+
|
|
67
|
+
### ❌ Example of incorrect code
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"rules": {
|
|
72
|
+
"strict-mode/add-missing": "off",
|
|
73
|
+
"strict-mode/remove-useless": "off"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### ✅ Example of correct code
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"rules": {
|
|
83
|
+
"nodejs/add-missing-strict-mode": "off",
|
|
84
|
+
"nodejs/remove-useless-strict-mode": "off"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
61
89
|
## convert-boolean-to-string
|
|
62
90
|
|
|
63
91
|
### ❌ Example of incorrect code
|
package/lib/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const applyLabels = require('./apply-labels');
|
|
4
|
+
const applyNodejs = require('./apply-nodejs');
|
|
3
5
|
const convertBooleanToString = require('./convert-boolean-to-string');
|
|
4
6
|
const removeEmpty = require('./remove-empty');
|
|
5
7
|
const MoveFormatterUp = require('./move-formatter-up');
|
|
6
|
-
const applyLabels = require('./apply-labels');
|
|
7
8
|
|
|
8
9
|
module.exports.rules = {
|
|
9
10
|
'apply-labels': applyLabels,
|
|
11
|
+
'apply-nodejs': applyNodejs,
|
|
10
12
|
'convert-boolean-to-string': convertBooleanToString,
|
|
11
13
|
'move-formatter-up': MoveFormatterUp,
|
|
12
14
|
'remove-empty': removeEmpty,
|
package/package.json
CHANGED