mirror of
https://github.com/Anduin2017/HowToCook.git
synced 2025-12-17 18:54:26 +08:00
lint 勺
This commit is contained in:
9
.github/manual_lint.js
vendored
9
.github/manual_lint.js
vendored
@@ -16,6 +16,15 @@ async function main() {
|
||||
titles = dataLines.filter(t => t.startsWith('#'));
|
||||
secondTitles = titles.filter(t => t.startsWith('## '));
|
||||
|
||||
if (dataLines.filter(line => line.includes(' 勺')).length > 0) {
|
||||
errors.push(`File ${filePath} is invalid! 勺 is not an accurate unit!`);
|
||||
}
|
||||
// if (dataLines.filter(line => line.includes('适量')).length > 0) {
|
||||
// errors.push(`File ${filePath} is invalid! 适量 is not an accurate unit!`);
|
||||
// }
|
||||
// if (dataLines.filter(line => line.includes('左右')).length > 0) {
|
||||
// errors.push(`File ${filePath} is invalid! 左右 is not an accurate unit!`);
|
||||
// }
|
||||
if (titles[0].trim() != "# " + filename + "的做法") {
|
||||
errors.push(`File ${filePath} is invalid! It's title should be: ${"# " + filename + "的做法"}! It was ${titles[0].trim()}!`);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user