diff --git a/package.json b/package.json index 03bfdf5de3c3..41ea9657c6bb 100644 --- a/package.json +++ b/package.json @@ -114,12 +114,6 @@ "singleQuote": true, "trailingComma": "all", "overrides": [ - { - "files": "**/*.md", - "options": { - "printWidth": 500 - } - }, { "excludeFiles": [ "e2e/__tests__/**/*", diff --git a/packages/pretty-format/README.md b/packages/pretty-format/README.md index 4981d42f9535..dc7ad51fa156 100755 --- a/packages/pretty-format/README.md +++ b/packages/pretty-format/README.md @@ -74,6 +74,7 @@ console.log(prettyFormat(onClick, options)); */ ``` + | key | type | default | description | | :------------------ | :-------- | :--------- | :------------------------------------------------------ | | `callToJSON` | `boolean` | `true` | call `toJSON` method (if it exists) on objects | @@ -211,6 +212,7 @@ Write `serialize` to return a string, given the arguments: ### config + | key | type | description | | :------------------ | :-------- | :------------------------------------------------------ | | `callToJSON` | `boolean` | call `toJSON` method (if it exists) on objects | @@ -252,7 +254,9 @@ function serializeItems(items, config, indentation, depth, refs, printer) { config.spacingOuter + items .map( - item => indentationItems + printer(item, config, indentationItems, depth, refs), // callback + item => + indentationItems + + printer(item, config, indentationItems, depth, refs), // callback ) .join(SEPARATOR + config.spacingInner) + (config.min ? '' : SEPARATOR) + // following the last item @@ -267,7 +271,12 @@ const plugin = { }, serialize(array, config, indentation, depth, refs, printer) { const name = array.constructor.name; - return ++depth > config.maxDepth ? '[' + name + ']' : (config.min ? '' : name + ' ') + '[' + serializeItems(array, config, indentation, depth, refs, printer) + ']'; + return ++depth > config.maxDepth + ? '[' + name + ']' + : (config.min ? '' : name + ' ') + + '[' + + serializeItems(array, config, indentation, depth, refs, printer) + + ']'; }, }; ```