@@ -5,6 +5,7 @@ The Prettier configuration used in atom-ide-community.
55This configuration supports all the formats including ` typescript ` , ` javascript ` , ` json ` , ` yaml ` , and ` markdown ` .
66
77## Installation
8+
89```
910npm install --save-dev prettier-config-atomic
1011```
@@ -13,6 +14,7 @@ npm install --save-dev prettier-config-atomic
1314<summary >This package also needs `prettier`.</summary >
1415
1516Either add the following to your ` .npmrc ` if using ` pnpm ` to hoist the prettier bundled with the config
17+
1618```
1719public-hoist-pattern[]=*
1820```
@@ -23,19 +25,22 @@ If using `npm`, the prettier dependency is hosted automatically.
2325
2426</details >
2527
26-
2728## Usage
29+
2830Add the following to your ` package.json `
31+
2932``` json
3033"prettier" : " prettier-config-atomic" ,
3134"scripts" : {
3235 "format" : " prettier --write ." ,
3336 "test.format" : " prettier . --check"
3437}
3538```
39+
3640and run ` npm run format ` to format the files. You can also use ` npm run test.format ` in the CI to test formatting of the project.
3741
3842To ignore some files from formatting, create a ` .prettierignore ` file and add the files to the list.
43+
3944```
4045node_modules
4146package.json
@@ -50,6 +55,7 @@ Also add the built folders like `dist` to the above list.
5055### Modifying the config
5156
5257Create a ` prettier.config.js ` file at the root of the project with the following content:
58+
5359``` js
5460module .exports = {
5561 ... require (" prettier-config-atomic" ),
@@ -58,5 +64,5 @@ module.exports = {
5864
5965 // an example:
6066 // semi: true,
61- };
67+ }
6268```
0 commit comments