-
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.
refactor: add prettier-config readme (#57)
* docs: move eslint-config README * docs: add prettier-config README
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,32 @@ | ||
## @yourssu/prettier-config | ||
|
||
Prettier ruleset designed for the Yourssu Web-Frontend Team. | ||
|
||
## Installation | ||
|
||
``` | ||
npm install @yourssu/prettier-config | ||
yarn add @yourssu/prettier-config | ||
pnpm install @yourssu/prettier-config | ||
``` | ||
|
||
## Rules | ||
|
||
- `trailingComma: 'es5'` : trailing commas where valid in ES5 (objects, arrays, etc.). Trailing commas in type parameters in TypeScript and Flow. | ||
- `printWidth: 100` : specify the line length that the printer will wrap on as 100. | ||
- `semi: true` : Add a semicolon at the end of every statement. | ||
- `singleQuote: true` : use single quotes | ||
- `tabWidth: 2` : specify the number of spaces per indentation-level as 2. | ||
- `arrowParens: 'always'` : Always include parens.<br/> | ||
EX. `(x) => x` ⭕️, `x => x` ❌ | ||
- `endOfLine: 'auto'` : maintain existing line endings (mixed values within one file are normalised by looking at what’s used after the first line) | ||
|
||
## Usage | ||
|
||
**package.json** | ||
|
||
``` | ||
"prettier": "@yourssu/prettier-config" | ||
``` |
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,32 @@ | ||
## @yourssu/prettier-config | ||
|
||
숭실대학교 동아리 유어슈 프론트엔드 팀을 위해 설계된 Prettier config입니다. | ||
|
||
## Installation | ||
|
||
``` | ||
npm install @yourssu/prettier-config | ||
yarn add @yourssu/prettier-config | ||
pnpm install @yourssu/prettier-config | ||
``` | ||
|
||
## Rules | ||
|
||
- `trailingComma: 'es5'` : 객체와 배열 같은 곳에서의 Trailing-comma를 허용한다. (타입스크립트 함수 파라미터에서는 비허용) | ||
- `printWidth: 100` : 한 줄 당 코드 길이를 100으로 제한 한다. | ||
- `semi: true` : 모든 문장의 끝에 세미콜론을 추가한다. | ||
- `singleQuote: true` : `''`와 같은 작은 따옴표를 사용한다. | ||
- `tabWidth: 2` : indent의 사이즈를 2로 설정한다. | ||
- `arrowParens: 'always'` : 화살표 함수에서 부모를 포함한다.<br/> | ||
EX. `(x) => x` ⭕️, `x => x` ❌ | ||
- `endOfLine: 'auto'` : 기존 줄 끝 유지한다. (한 파일 내에서 혼합된 값은 첫 번째 줄 뒤에 사용된 것을 확인하여 정규화) | ||
|
||
## Usage | ||
|
||
**package.json** | ||
|
||
``` | ||
"prettier": "@yourssu/prettier-config" | ||
``` |