Error messages and my codes:
Found fs.existsSync with non literal argument at index 0
if (!fs.existsSync(dbFolder)){
Found fs.mkdirSync with non literal argument at index 0
fs.mkdirSync(dbFolder);
Found fs.readFileSync with non literal argument at index 0
const content = JSON.parse(fs.readFileSync(`${this.dbFolder}/${this.dbName}.json`, "utf8"));
Found fs.writeFileSync with non literal argument at index 0
fs.writeFileSync(`${dbFolder}/${dbName}.json`, "{}");
if you wonder what's the problem, it's in the error message. It's bad practice to use a non literal (a variable) on fs.readFileSync first argument.
See https://github.com/nodesecurity/eslint-plugin-security#detect-non-literal-fs-filename