eslint-plugin-putout 15.0.0 → 15.2.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/lib/align-spaces/README.md +1 -1
- package/lib/evaluate/index.js +1 -1
- package/lib/markdown.js +4 -1
- package/lib/newline-function-call-arguments/README.md +2 -2
- package/lib/newline-function-call-arguments/index.js +4 -4
- package/lib/object-property-newline/index.js +3 -2
- package/package.json +2 -2
package/lib/evaluate/index.js
CHANGED
package/lib/markdown.js
CHANGED
|
@@ -9,7 +9,7 @@ Part of [**eslint-plugin-putout**](https://github.com/coderaiser/putout/tree/mas
|
|
|
9
9
|
|
|
10
10
|
```js
|
|
11
11
|
const onConnectError = squad(superFn(connect_error),
|
|
12
|
-
|
|
12
|
+
logWrapped(isLog, importStr),
|
|
13
13
|
addUrl(colorUrl),
|
|
14
14
|
getDescription);
|
|
15
15
|
```
|
|
@@ -19,7 +19,7 @@ const onConnectError = squad(superFn(connect_error),
|
|
|
19
19
|
```js
|
|
20
20
|
const onConnectError = squad(
|
|
21
21
|
superFn(connect_error),
|
|
22
|
-
|
|
22
|
+
logWrapped(isLog, importStr),
|
|
23
23
|
addUrl(colorUrl),
|
|
24
24
|
getDescription,
|
|
25
25
|
);
|
|
@@ -23,13 +23,13 @@ module.exports.filter = ({node, text}) => {
|
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const textPeace = text.replace(name, '');
|
|
27
27
|
|
|
28
|
-
if (
|
|
28
|
+
if (textPeace.length < 60)
|
|
29
29
|
return false;
|
|
30
30
|
|
|
31
|
-
const isOpenBracket = /^\(\n/.test(
|
|
32
|
-
const isCloseBracket = /\n\s*\)$/.test(
|
|
31
|
+
const isOpenBracket = /^\(\n/.test(textPeace);
|
|
32
|
+
const isCloseBracket = /\n\s*\)$/.test(textPeace);
|
|
33
33
|
|
|
34
34
|
if (isOpenBracket && isCloseBracket)
|
|
35
35
|
return false;
|
|
@@ -55,8 +55,9 @@ module.exports.filter = ({node}) => {
|
|
|
55
55
|
|
|
56
56
|
module.exports.fix = ({text}) => {
|
|
57
57
|
return text
|
|
58
|
-
.replace(
|
|
58
|
+
.replace(/,(\s+)?/g, ',\n ')
|
|
59
59
|
.replace(/{/g, '{\n ')
|
|
60
|
-
.replace(/}/g, '\n}')
|
|
60
|
+
.replace(/}/g, '\n}')
|
|
61
|
+
.replace(/\n(\s+)?\n/g, '\n');
|
|
61
62
|
};
|
|
62
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "ESLint plugin for 🐊Putout",
|
|
6
6
|
"release": false,
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"eslint": ">=8.0.0",
|
|
68
|
-
"putout": ">=
|
|
68
|
+
"putout": ">=26"
|
|
69
69
|
},
|
|
70
70
|
"license": "MIT",
|
|
71
71
|
"publishConfig": {
|