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

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.

主站蜘蛛池模板: 新竹市| 威信县| 惠来县| 金乡县| 景德镇市| 湖州市| 闸北区| 聂荣县| 铜陵市| 尚义县| 洞口县| 崇左市| 集贤县| 新蔡县| 阿合奇县| 鲁山县| 稷山县| 宿松县| 兰考县| 云梦县| 荣成市| 泉州市| 奎屯市| 井陉县| 娄烦县| 神池县| 正安县| 万州区| 于都县| 和静县| 县级市| 汉阴县| 通江县| 鹰潭市| 晋州市| 临海市| 垣曲县| 沅陵县| 汉中市| 金寨县| 昭觉县|