官术网_书友最值得收藏!

Prettier

I have used Prettier to format code samples, and its configuration is set within package.json in each of the appointments and spec-logo projects. Here it is:

"prettier": {
"singleQuote": true,
"printWidth": 67,
"jsxBracketSameLine": true
}

Feel free to change this to your own configuration and reformat files as you see fit. The line width of 67 characters is particularly short but ensures that, for the most part, code snippets do not suffer from line breaks.

The one place this is not true is with test descriptions:

it('passes from and to times through to appointments when retrieving appointments', async () => {

In these cases, although the text is printed over two lines, you should enter it on one line only. If you are copy and pasting code samples from the electronic version of this book, you’ll need to remove the extra line breaks that are inserted by your editor.

主站蜘蛛池模板: 吉木萨尔县| 吉安县| 沅江市| 永城市| 麻阳| 静安区| 安远县| 永胜县| 广灵县| 高邑县| 郑州市| 石渠县| 家居| 全椒县| 宁阳县| 安远县| 泉州市| 诸暨市| 霍林郭勒市| 新巴尔虎右旗| 章丘市| 鄂伦春自治旗| 宁德市| 连江县| 瑞丽市| 大冶市| 上虞市| 西乡县| 晋宁县| 郁南县| 安远县| 堆龙德庆县| 仲巴县| 青冈县| 英吉沙县| 鹤山市| 秦安县| 林甸县| 弥勒县| 浪卡子县| 绥化市|