LoginSignup
1
1

More than 3 years have passed since last update.

CakePHP4 + Vue.js 開発での .editorconfig の設定内容

Last updated at Posted at 2020-03-19

新しいプロジェクトを始めるたびに .editorconfig を変更していてるので、備忘録として残します。
新しい設定が必要なったら編集して記載内容を更新する予定です。

この記事でわかること

.editorconfig

CakePHP4 で Vue.js ( Laravel-Mix ) を使えるようにして docker-compose で動くようにする で作ったソースを元に始めます。

CakePHP4 のプロジェクトを作った時点で .editorconfig が用意されるのですが、足りない点があるので追記します。

.editorconfig
root = true

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

[*.bat]
end_of_line = crlf

[*.{yml,json,scss,html,js,vue,neon}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.twig]
insert_final_newline = false

[Makefile]
indent_style = tab

追記した点を補足します。

[*] > charset = utf-8
文字コードの指定です。
[*.{yml,json,scss,html,js,vue}] > indent_size = 2
インデント2のファイルは yml のみになっていたので、json, scss, html, js, vue とフロント開発に必要な拡張子を追加します。
[*.md] > trim_trailing_whitespace = false
markdown は後方スペースで改行を示す場合がある(使いたくない機能だけど)ので false とします。
1
1
1

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
1
1