@putout/plugin-putout-config 2.0.0 β 3.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 +5 -5
- package/lib/convert-boolean-to-string/index.js +1 -0
- package/lib/index.js +0 -1
- package/lib/remove-empty/index.js +12 -4
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-putout-config.svg?style=flat&longCache=true
|
|
4
4
|
[NPMURL]: https://npmjs.org/package/@putout/plugin-putout-config"npm"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
π[**Putout**](https://github.com/coderaiser/putout) plugin helps with π[**Putout Config**](https://github.com/coderaiser/putout#-configuration).
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -24,7 +24,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
24
24
|
|
|
25
25
|
## convert-boolean-to-string
|
|
26
26
|
|
|
27
|
-
### β
|
|
27
|
+
### β Example of incorrect code
|
|
28
28
|
|
|
29
29
|
```json
|
|
30
30
|
{
|
|
@@ -35,7 +35,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
### β
|
|
38
|
+
### β
Example of correct code
|
|
39
39
|
|
|
40
40
|
```json
|
|
41
41
|
{
|
|
@@ -48,7 +48,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
48
48
|
|
|
49
49
|
## remove-empty
|
|
50
50
|
|
|
51
|
-
### β
|
|
51
|
+
### β Example of incorrect code
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
@@ -62,7 +62,7 @@ npm i @putout/plugin-putout-config -D
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
### β
|
|
65
|
+
### β
Example of correct code
|
|
66
66
|
|
|
67
67
|
```json
|
|
68
68
|
{
|
|
@@ -20,6 +20,7 @@ module.exports.fix = (path) => {
|
|
|
20
20
|
module.exports.traverse = ({push}) => ({
|
|
21
21
|
'__putout_processor_json(__a)'(path) {
|
|
22
22
|
const objectPath = path.get('arguments.0');
|
|
23
|
+
|
|
23
24
|
const propPaths = [
|
|
24
25
|
...getProperties('rules', objectPath),
|
|
25
26
|
...getMatchProperties(objectPath),
|
package/lib/index.js
CHANGED
|
@@ -6,10 +6,19 @@ module.exports.fix = (path) => {
|
|
|
6
6
|
path.parentPath.remove();
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
module.exports.include = () => [
|
|
9
|
+
module.exports.include = () => [
|
|
10
|
+
'ObjectExpression',
|
|
11
|
+
'ArrayExpression',
|
|
12
|
+
];
|
|
10
13
|
module.exports.filter = (path) => {
|
|
11
|
-
const {
|
|
12
|
-
|
|
14
|
+
const {
|
|
15
|
+
parentPath,
|
|
16
|
+
node,
|
|
17
|
+
} = path;
|
|
18
|
+
const {
|
|
19
|
+
properties,
|
|
20
|
+
elements,
|
|
21
|
+
} = node;
|
|
13
22
|
|
|
14
23
|
if (!parentPath.isObjectProperty())
|
|
15
24
|
return false;
|
|
@@ -24,4 +33,3 @@ module.exports.filter = (path) => {
|
|
|
24
33
|
|
|
25
34
|
return !elements.length;
|
|
26
35
|
};
|
|
27
|
-
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"type": "commonjs",
|
|
4
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
|
-
"description": "
|
|
6
|
+
"description": "πPutout plugin helps to maintain putout config",
|
|
6
7
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-putout-config#readme",
|
|
7
8
|
"main": "lib/index.js",
|
|
8
9
|
"release": false,
|
|
@@ -31,21 +32,21 @@
|
|
|
31
32
|
"config"
|
|
32
33
|
],
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@putout/test": "^
|
|
35
|
+
"@putout/test": "^6.0.0",
|
|
35
36
|
"c8": "^7.5.0",
|
|
36
37
|
"eslint": "^8.0.1",
|
|
37
|
-
"eslint-plugin-
|
|
38
|
-
"eslint-plugin-putout": "^
|
|
39
|
-
"lerna": "^
|
|
40
|
-
"madrun": "^
|
|
38
|
+
"eslint-plugin-n": "^16.0.0",
|
|
39
|
+
"eslint-plugin-putout": "^17.0.0",
|
|
40
|
+
"lerna": "^6.0.1",
|
|
41
|
+
"madrun": "^9.0.0",
|
|
41
42
|
"nodemon": "^2.0.1"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"putout": ">=
|
|
45
|
+
"putout": ">=29"
|
|
45
46
|
},
|
|
46
47
|
"license": "MIT",
|
|
47
48
|
"engines": {
|
|
48
|
-
"node": ">=
|
|
49
|
+
"node": ">=16"
|
|
49
50
|
},
|
|
50
51
|
"publishConfig": {
|
|
51
52
|
"access": "public"
|