mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-14 02:16:15 +00:00
feat(ci): json files should not be in root
This commit is contained in:
1 parent
3bd87b2da0
commit
61ed491666
1 file changed
+11
@@ -93,3 +93,14 @@ t("All files should have valid optional fields", (t) => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const ignoredJSONFiles = [
|
||||
"package-lock.json",
|
||||
"package.json"
|
||||
]
|
||||
|
||||
t("JSON files should not be in the root directory", (t) => {
|
||||
const files = fs.readdirSync(path.resolve()).filter((file) => file.endsWith(".json") && !ignoredJSONFiles.includes(file));;
|
||||
|
||||
t.is(files.length, 0, "JSON files should not be in the root directory");
|
||||
});
|
||||
Reference in new issue
Block a user