EveSunMaple / Frosti

A clean, elegant, and fast static blog template! 🚀 Developed with Astro
https://frosti.saroprock.com
GNU General Public License v3.0
200 stars 30 forks source link

Use eslint for a unified code style and format the codes #12

Closed nick-cjyx9 closed 3 months ago

nick-cjyx9 commented 4 months ago

I use @antfu/eslint-config preset which is widely accepted.

Remember to squash before merge.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frosti ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2024 2:45pm
EveSunMaple commented 4 months ago

问题是我的代码都是我自己格式化过的,您这样等我再格式化一次不是白改了吗👉👈

nick-cjyx9 commented 4 months ago

能够理解你的想法, 但是作为一个开源项目,使用 lint 可以大幅提高贡献者的协作效率,也能防止写出明显 unsafe 的代码,你可以按自己的喜好配置 lint ,但是它对于这个体量的项目绝对是必要的。

If you do not agree though, feel free to close this PR

nick-cjyx9 commented 4 months ago

比如使用 IDE 编程的时候,很难保证自己是不是一直保持每行都分号或者不分号。(虽然只是一些细节问题) 而良好配置的 lint 可以省去你手动格式化的一步

EveSunMaple commented 4 months ago

说实话我不了解 lint ,这4000+的修改着实不能马上合并,等我了解 lint 以后再说吧

nick-cjyx9 commented 4 months ago

嗯,不放心的话可以自己跑一遍 lint . --fix

nick-cjyx9 commented 3 months ago

There's a mass of conflicts, so I have to close this.