walinejs / waline

💬 A Simple, Safe Comment System
https://waline.js.org/en/
GNU General Public License v2.0
2.19k stars 379 forks source link

[建议]添加评论字数要求功能 #206

Closed MSDNicrosoft closed 3 years ago

MSDNicrosoft commented 3 years ago

添加个评论字数要求功能(部署时用户可选,默认关闭) 要求最多多少字和最少多少字,两个环境变量,只要添加其中任何一项就启用此功能

Mister-Hope commented 3 years ago

I will take this if you would like to add this feature.

This should be added in @waline/client options in my opinion. @lizheming

lizheming commented 3 years ago

@Mister-Hope Thank you, I'm very happy to see you implement it~

Mister-Hope commented 3 years ago

@Mister-Hope Thank you, I'm very happy to see you implement it~

I would like to add some unit tests when writting features, which one do you prefer? jest or mocha? I will use the one you pick.

Also I would prefer to call this option wordLimit as it's short, what's your opinion?

lizheming commented 3 years ago

@Mister-Hope OK, I'd like to use jest~ and wordLimit is OK, and it will work only when the value is not undefined and 0.

Mister-Hope commented 3 years ago

I also have another question. In which way are you working on this project when not uploading version lock file and not including it in .gitignore at the same time? 🤣

There supposed to be a untracking version lock file in the project root by doing like this.

image

@lizheming

Shall they be add to .gitignore or just be added into the commit history?

lizheming commented 3 years ago

@Mister-Hope I usually use npm rather than yarn. I'm not very like lock file, so I close npm lock file config. So you can commit yarn lock file into repo, that has little effect for me.

lizheming commented 3 years ago

close by https://github.com/lizheming/waline/pull/219