SlideShare a Scribd company logo
'single quote' "double quote"
if ( str === 'true' ) {
return true;
}
if ( str === 'true' )

{
return true;
}


# 유닉스 형태의 줄 바꿈, 파일 끝 빈 줄 삽입, 줄 끝 공백 제거, 스페이스 4칸
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
# 중괄호 표기를 사용해 여러 파일 확장자에 설정 적용, 기본 문자셋
[*.{js,py}]
charset = utf-8
# lib 디렉토리 아래의 JS 파일엔 별도의 들여쓰기 설정 적용
[lib/**.js]
indent_style = space
indent_size = 2




{
"rules": {
"length-zero-no-unit": true
}
}


/* style.css */
body {
background: #fff;
font-size: 1.2em;
}
$> stylefmt -c stylefmt.json style.css
margin: 0em;
/* style.css */
body {
background: #fff;
font-size: 1.2em;
}
$> stylefmt -c stylefmt.json style.css
margin: 0;




{

"scripts": {

"prettier": "prettier —single-quote --write **/*.js"

}

}
func(arg1, arg2, arg3);
func(aFunctionWhoHasALongName(), iAmSoLong
func(arg1, arg2, arg3);
func(

aFunctionWhoHasALongName(),

iAmSoLongToo(),

weNeedLineBreaks()

);
세미콜론?
객체 표기 끝의 쉼표?
탭? 스페이스?
잊어버리세요.
Prettier가 있습니다.


{

"scripts": {

"precommit": "lint-staged",

"prepush": "npm test",

"...": "..."

},

"lint-staged": {

"*.js": [

"prettier —-write",

"git add"

]

}

}
감사합니다

More Related Content

What's hot

[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
Shengyou Fan
 

What's hot (20)

Angular Interview Questions & Answers
Angular Interview Questions & AnswersAngular Interview Questions & Answers
Angular Interview Questions & Answers
 
Pros & cons of svelte
Pros & cons of sveltePros & cons of svelte
Pros & cons of svelte
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019
 
The PostgreSQL Query Planner
The PostgreSQL Query PlannerThe PostgreSQL Query Planner
The PostgreSQL Query Planner
 
Rust
RustRust
Rust
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
 
[22]Efficient and Testable MVVM pattern
[22]Efficient and Testable MVVM pattern[22]Efficient and Testable MVVM pattern
[22]Efficient and Testable MVVM pattern
 
Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
 
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
 
이벤트 기반 분산 시스템을 향한 여정
이벤트 기반 분산 시스템을 향한 여정이벤트 기반 분산 시스템을 향한 여정
이벤트 기반 분산 시스템을 향한 여정
 
Svelte
SvelteSvelte
Svelte
 
Railway Oriented Programming
Railway Oriented ProgrammingRailway Oriented Programming
Railway Oriented Programming
 
jQuery
jQueryjQuery
jQuery
 
Working with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDBWorking with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDB
 
Spring annotations notes
Spring annotations notesSpring annotations notes
Spring annotations notes
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
[2019] 200만 동접 게임을 위한 MySQL 샤딩
[2019] 200만 동접 게임을 위한 MySQL 샤딩[2019] 200만 동접 게임을 위한 MySQL 샤딩
[2019] 200만 동접 게임을 위한 MySQL 샤딩
 

More from Taegon Kim

More from Taegon Kim (11)

FE로 취업 전에 알았으면 좋았을 것들
FE로 취업 전에 알았으면 좋았을 것들FE로 취업 전에 알았으면 좋았을 것들
FE로 취업 전에 알았으면 좋았을 것들
 
Universal Rendering
Universal RenderingUniversal Rendering
Universal Rendering
 
ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기
 
React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작
 
ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는
 
패스트캠퍼스 프론트엔드 강의 오리엔테이션
패스트캠퍼스 프론트엔드 강의 오리엔테이션패스트캠퍼스 프론트엔드 강의 오리엔테이션
패스트캠퍼스 프론트엔드 강의 오리엔테이션
 
오늘 당장 시작하는 HTML5
오늘 당장 시작하는 HTML5오늘 당장 시작하는 HTML5
오늘 당장 시작하는 HTML5
 
Fiddler: 웹 디버깅 프록시
Fiddler: 웹 디버깅 프록시Fiddler: 웹 디버깅 프록시
Fiddler: 웹 디버깅 프록시
 
진화하는 소셜 큐레이션 서비스와 관련 기술
진화하는 소셜 큐레이션 서비스와 관련 기술진화하는 소셜 큐레이션 서비스와 관련 기술
진화하는 소셜 큐레이션 서비스와 관련 기술
 
XpressEngine : 보드에서 CMS로
XpressEngine : 보드에서 CMS로XpressEngine : 보드에서 CMS로
XpressEngine : 보드에서 CMS로
 
jQuery Trend
jQuery TrendjQuery Trend
jQuery Trend
 

프론트엔드 코딩 컨벤션 자동화 도구