EditorConfig

Jmnote (토론 | 기여)님의 2024년 7월 29일 (월) 01:19 판 (→‎개요)

1 개요

EditorConfig
에디터컨피그
.editorconfig 파일
  • 동일한 프로젝트 내에서 여러 개발자가 다양한 편집기 및 IDE를 사용하여 작업하는 경우, 일관된 코딩 스타일을 유지하는 데 도움을 준다.
  • 코딩 스타일을 정의하는 파일 형식과 정의된 스타일을 준수할 수 있도록 하는 텍스트 편집기 플러그인으로 구성된다.
  • EditorConfig 파일은 읽기 쉽고, 버전 관리 시스템과도 잘 작동한다.

Editorconfig-logo.png

2 예시

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}