@putout/printer 13.0.0 → 13.0.1
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/ChangeLog
CHANGED
|
@@ -34,6 +34,7 @@ const {
|
|
|
34
34
|
isIdentifier,
|
|
35
35
|
isFunction,
|
|
36
36
|
isCallExpression,
|
|
37
|
+
isObjectProperty,
|
|
37
38
|
} = types;
|
|
38
39
|
|
|
39
40
|
const isNextString = (path) => isStringLiteral(path.getNextSibling());
|
|
@@ -133,7 +134,9 @@ module.exports.ArrayExpression = {
|
|
|
133
134
|
if (index < n || trailingComma)
|
|
134
135
|
maybe.print(is, ',');
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
if (!(isObjectExpression(element) && isObjectProperty(path.parentPath)))
|
|
138
|
+
maybe.print.newline((is || isSpreadBeforeObject(element)) && !isNextObject(element));
|
|
139
|
+
|
|
137
140
|
maybe.print.space(is && isObjectAfterSimple(element));
|
|
138
141
|
|
|
139
142
|
if (!is && index < n) {
|
package/lib/tokenize/is.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Simplest possible opinionated Babel AST printer for 🐊Putout",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@putout/eslint": "^
|
|
68
|
+
"@putout/eslint": "^4.1.0",
|
|
69
69
|
"@putout/eslint-flat": "^2.0.0",
|
|
70
70
|
"@putout/plugin-minify": "^9.0.0",
|
|
71
71
|
"@putout/plugin-printer": "^4.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"check-dts": "^0.8.0",
|
|
78
78
|
"escover": "^4.0.1",
|
|
79
79
|
"eslint": "^9.0.0",
|
|
80
|
-
"eslint-plugin-putout": "^
|
|
80
|
+
"eslint-plugin-putout": "^25.0.1",
|
|
81
81
|
"estree-to-babel": "^10.0.0",
|
|
82
82
|
"goldstein": "^5.14.0",
|
|
83
83
|
"just-kebab-case": "^4.2.0",
|