-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9b583e
commit 9ed5c2f
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@duchi/prettier-config": patch | ||
--- | ||
|
||
Update readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# @duchi/prettier-config | ||
|
||
## Installation | ||
|
||
λ¨λ μΌλ‘ μ¬μ©ν κ²½μ°: | ||
|
||
```bash | ||
npm i -D @duchi/prettier-config | ||
``` | ||
|
||
prettierμ ν¨κ» μ¬μ©ν κ²½μ°: | ||
|
||
```bash | ||
npm i -D prettier @duchi/prettier-config | ||
``` | ||
|
||
## Usage | ||
|
||
μ΄ Prettier ꡬμ±μ μ¬μ©νλ €λ©΄ `package.json` νμΌμ λ€μμ μΆκ°νμΈμ. | ||
|
||
```json | ||
{ | ||
// ... κΈ°μ‘΄ package.json λ΄μ© | ||
"prettier": "@duchi/prettier-config" | ||
} | ||
``` | ||
|
||
λλ νλ‘μ νΈ λ£¨νΈμ `.prettierrc`νμΌμ λ§λ€κ³ λ€μμ μΆκ°νμΈμ. | ||
|
||
```json | ||
"@duchi/prettier-config" | ||
``` | ||
|
||
## Configuration | ||
|
||
`@duchi/prettier-config`λ 미리 μ μλ κ·μΉ μΈνΈλ₯Ό μ 곡ν©λλ€. κ·Έλ¬λ νλ‘μ νΈμ Prettier κ΅¬μ± νμΌμ μμ λ§μ κ·μΉμ μΆκ°νμ¬ κ·μΉμ μ¬μ μν μ μμ΅λλ€. | ||
|
||
`.prettierrc`μμ κ΅¬μ± μ¬μ μ μμ: | ||
|
||
```json | ||
{ | ||
"printWidth": 120, | ||
"semi": false, | ||
"singleQuote": false | ||
} | ||
``` | ||
|
||
## Extending the Configuration | ||
|
||
νμμ λ°λΌ μ΄ κ΅¬μ±μ νμ₯ν΄μΌ νλ κ²½μ° νλ‘μ νΈ λ£¨νΈμ `prettier.config.js` λλ `.prettierrc.js` νμΌμ μμ±νκ³ `@duchi/prettier-config` μ€μ μ κ°μ Έμ€λ©΄ λ©λλ€. | ||
|
||
```js | ||
module.exports = { | ||
...require("@duchi/prettier-config"), | ||
printWidth: 100, | ||
semi: false, | ||
}; | ||
``` | ||
|
||
### Prettier Configuration File | ||
|
||
Prettierλ λ€μν λ°©λ²μΌλ‘ μ€μ μ μ§μν©λλ€. μ€μ νμΌμ λ€μ μμλλ‘ μ°μ μμλ₯Ό κ°μ§λλ€: | ||
|
||
1. `package.json` νμΌμ `"prettier"` ν€ | ||
2. `.prettierrc` νμΌ (JSON λλ YAML νμ) | ||
3. `.prettierrc.json`, `.prettierrc.yml`, `.prettierrc.yaml`, `.prettierrc.json5` νμΌ | ||
4. `.prettierrc.js`, `prettier.config.js` νμΌ (CommonJS λλ ES Module νμ) | ||
5. `.prettierrc.toml` νμΌ | ||
|
||
μΆμ²: [Configuration File](https://prettier.io/docs/en/configuration.html) |