Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] document html write one line is code format rule in this project #39

Closed
euledge opened this issue Sep 10, 2023 · 1 comment
Closed

Comments

@euledge
Copy link
Contributor

euledge commented Sep 10, 2023

以下のように、documentのhtmlで改行なしに1行で書いているのは意図してのことでしょうか?

image

今のprettierの設定だと、強制的に改行してしまうので、この書き方を保つのならばformatさせないように .prettierignore に含めたほうが良いと思います。

  • yarn format だと.prettierignoreにないのでhtmlもフォーマットされてしまう。
.next
out
dist
build
src/__generated__
src/schema.graphql
  • lint-stagedによるコミット時のhookにはhtmlは含まれないのでフォーマットされない。
  "lint-staged": {
    "*.{ts,css,md}": "prettier --write"
  }
@KishiTheMechanic
Copy link
Collaborator

ありがとうございます!
.prettierignoreに追加しました👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants