Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

git commit时自动格式化代码,但是将我写的大写PX格式化成了小写px,这个怎么解决呢,我的需求是对px的大小写不要转换

git commit时自动格式化代码,但是将我写的大写PX格式化成了小写px,这个怎么解决呢,我的需求是对px的大小写不要转换


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

1 Answer

0 votes
by (71.8m points)

1.看看package.json文件里pre-commit字段用的是什么命令
2.找到这个命令,看看这个命令执行了什么,用了什么三方包
3.添加这个三方包的配置,按照自己设定的参数去格式化


暴力方法: git commit -n -m "xx"
忽略自动格式化代码


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...