LoginSignup
3
3

More than 5 years have passed since last update.

editorConfigの導入メモ

Last updated at Posted at 2016-12-08

EditorConfig

プロジェクトのタブ/スペース, 2/4タブ, 改行コードなどをエディタまたぎで設定・統一できるツール。
EditorConfig http://editorconfig.org/

とりあえず、reactで書いてるプロジェクトに下記ファイルをルートにぶっこむ

.editorconfig
root = true

[*]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.js,*.jsx]
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false

エディタへの導入

vim

deinユーザーなら下記を追加

~/.vim/rc/dein.toml
[[plugins]]
 repo = 'editorconfig/editorconfig-vim'

atom

apm install editorconfig

vscode

# パレット起動
cmd+shift+P

ext install EditorConfig
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3