Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
505 views
in Technique[技术] by (71.8m points)

javascript - How to base .prettierignore file on .gitignore

Looking at the Prettier docs, there is a tip to base your .prettierignore file on your .gitignore file.

https://prettier.io/docs/en/install.html

Tip! Base your .prettierignore on .gitignore and .eslintignore (if you have one).

Can someone explain what this means and how to do this? Is there a way to automatically add everything to your .prettierignore included in your .gitignore?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

They're not implying there's an automatic way to do this, but you could cp .gitignore .prettierignore (or copy it some other way, such as in your IDE). There is a proposal to include other ignore files as well as a node tool to automate this for you if you want to, though.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...