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

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.

主站蜘蛛池模板: 宁强县| 德兴市| 和林格尔县| 扎赉特旗| 河源市| 宾川县| 双牌县| 沁阳市| 肇源县| 奇台县| 德令哈市| 宜阳县| 襄垣县| 台中县| 轮台县| 彩票| 漳浦县| 额济纳旗| 泉州市| 榆林市| 兰溪市| 游戏| 平利县| 崇信县| 和田县| 闽侯县| 常德市| 普兰县| 海城市| 通山县| 武功县| 桂平市| 马龙县| 衢州市| 龙南县| 湘乡市| 龙门县| 五峰| 镇江市| 蒙山县| 浏阳市|