@putout/printer
Advanced tools
Comparing version 8.13.0 to 8.14.0
@@ -32,3 +32,3 @@ 'use strict'; | ||
const {ArrayExpression} = require('./array-expression/array-expression'); | ||
const {ArrayPattern} = require('./array-pattern'); | ||
const {ArrayPattern} = require('./array-pattern/array-pattern'); | ||
const {AssignmentPattern} = require('./assignment-pattern'); | ||
@@ -35,0 +35,0 @@ const {RestElement} = require('./rest-element'); |
@@ -24,2 +24,6 @@ 'use strict'; | ||
function isIndent(path) { | ||
return !path.parentPath.isArrayPattern(); | ||
} | ||
module.exports.ObjectPattern = { | ||
@@ -29,3 +33,4 @@ print: maybeTypeAnnotation((path, {indent, print, maybe}, semantics) => { | ||
indent.inc(); | ||
const shouldIndent = isIndent(path); | ||
maybe.indent.inc(shouldIndent); | ||
print('{'); | ||
@@ -92,4 +97,4 @@ | ||
indent.dec(); | ||
maybe.indent(is); | ||
maybe.indent.dec(shouldIndent); | ||
maybe.indent(is && shouldIndent); | ||
print('}'); | ||
@@ -164,1 +169,2 @@ }), | ||
} | ||
{ | ||
"name": "@putout/printer", | ||
"version": "8.13.0", | ||
"version": "8.14.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210414
4680