From c4dcfd93a732c950004c500b8696a50412d8ad82 Mon Sep 17 00:00:00 2001 From: zwei Date: Tue, 16 Jan 2018 16:20:46 +0800 Subject: [PATCH] [guide] fix indentation in section 4.7 --- README.md | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index d6f4836f..7e5a491b 100644 --- a/README.md +++ b/README.md @@ -441,39 +441,39 @@ Other Style Guides - [4.7](#arrays--bracket-newline) Use line breaks after open and before close array brackets if an array has multiple lines - ```javascript - // bad - const arr = [ - [0, 1], [2, 3], [4, 5], - ]; + ```javascript + // bad + const arr = [ + [0, 1], [2, 3], [4, 5], + ]; - const objectInArray = [{ - id: 1, - }, { - id: 2, - }]; - - const numberInArray = [ - 1, 2, - ]; - - // good - const arr = [[0, 1], [2, 3], [4, 5]]; - - const objectInArray = [ - { + const objectInArray = [{ id: 1, - }, - { + }, { id: 2, - }, - ]; + }]; - const numberInArray = [ - 1, - 2, - ]; - ``` + const numberInArray = [ + 1, 2, + ]; + + // good + const arr = [[0, 1], [2, 3], [4, 5]]; + + const objectInArray = [ + { + id: 1, + }, + { + id: 2, + }, + ]; + + const numberInArray = [ + 1, + 2, + ]; + ``` **[⬆ back to top](#table-of-contents)**