1. 자바스크립트 스타일 가이드
다양한 자바스크립트 스타일 가이드는 다음을 참고하면 좋다
( 코드 에디터마다 들여쓰기가 다를 수 있으나 하단의 스타일 가이드들은 대부분 2칸 space를 권장한다)
https://google.github.io/styleguide/jsguide.html
Google JavaScript Style Guide
Google JavaScript Style Guide 1 Introduction This document serves as the complete definition of Google’s coding standards for source code in the JavaScript programming language. A JavaScript source file is described as being in Google Style if and only i
google.github.io
https://www.w3schools.com/js/js_conventions.asp
JavaScript Style Guide
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
https://github.com/ParkSB/javascript-style-guide
GitHub - parksb/javascript-style-guide: Airbnb JavaScript 스타일 가이드
Airbnb JavaScript 스타일 가이드. Contribute to parksb/javascript-style-guide development by creating an account on GitHub.
github.com
https://standardjs.com/rules-kokr.html
JavaScript Standard Style
English • Español (Latinoamérica) • Français • Bahasa Indonesia • Italiano (Italian) • 日本語 (Japanese) • 한국어 (Korean) • Português (Brasil) • 简体中文 (Simplified Chinese) • 繁體中文 (Taiwanese Mandarin) 이것은 Ja
standardjs.com
https://github.com/rwaldron/idiomatic.js/tree/master/translations/ko_KR
2. VS Code에서 indentation 설정 (들여쓰기 설정)
Settings 설정창 열기 - 단축키는 ctrl + ,
상단 검색창에 editor tab을 검색한 후
detect indentation 체크 해제
tab size 2로 변경
insert spaces 체크 해제
이미 작성한 코드에는 변경 내용이 적용되지 않으니
이미 작성한 코드 파일에 가서
전체 선택을 하고
마우스 우클릭 후 메뉴에서 Fomat Document 선택 - 단축키는 shift alt f
'[ Computer Science ] > JavaScript' 카테고리의 다른 글
[Web/Node.js] node.js 기초 express 기초 (0) | 2024.05.16 |
---|---|
[JavaScript] 자바스크립트 기초 5. 형 변환(1) (0) | 2024.02.11 |
[JavaScript] 자바스크립트 기초 4. 자료형 활용 (number, string, boolean, typeof) (1) | 2024.02.11 |
[JavaScript] 자바스크립트 기초 3. return문 개념 (1) | 2024.02.11 |
[JavaScript] 자바스크립트 기초 2. 자료형, 추상화, 변수, 함수, 파라미터 개념 (2) | 2024.02.11 |
[JavaScript] 자바스크립트 기초 1. 개요 (1) | 2024.02.11 |