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

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.

主站蜘蛛池模板: 安丘市| 西青区| 阿图什市| 沽源县| 繁峙县| 兴文县| 滕州市| 德保县| 巧家县| 徐水县| 台中市| 武城县| 凤城市| 南投市| 商都县| 横山县| 高安市| 大理市| 晋中市| 泉州市| 孝感市| 子洲县| 富平县| 左权县| 朝阳区| 辽中县| 勃利县| 垣曲县| 乌鲁木齐县| 南宫市| 红桥区| 昭通市| 丹棱县| 中阳县| 福泉市| 达拉特旗| 手机| 当雄县| 徐汇区| 博白县| 家居|