We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not expose connectionString https://github.com/quangpl/cnpm-ezlife/blob/master/config.js#L3
connectionString
Try to use const for imports, and bring all imports to the top of the file. https://github.com/quangpl/cnpm-ezlife/blob/master/app.js#L8
const
Try to use ref. The current usage is fine but if you go with storing the IDs of related models, try to use ref from mongoose.
ref
mongoose
Consider extracting this schemaOptions object out to a const:
schemaOptions
{ timestamps: true, versionKey: false }
https://github.com/quangpl/cnpm-ezlife/blob/master/schemas/amount_report.js#L7
Just do return res.render(...) instead https://github.com/quangpl/cnpm-ezlife/blob/master/routes/page.js#L18
return res.render(...)
When you use async/await, if you don't have try/catch to handle errors, you don't need to return await ...
async/await
try/catch
return await ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Do not expose
connectionString
https://github.com/quangpl/cnpm-ezlife/blob/master/config.js#L3
Try to use
const
for imports, and bring all imports to the top of the file.https://github.com/quangpl/cnpm-ezlife/blob/master/app.js#L8
Try to use
ref
. The current usage is fine but if you go with storing the IDs of related models, try to useref
frommongoose
.Consider extracting this
schemaOptions
object out to aconst
:https://github.com/quangpl/cnpm-ezlife/blob/master/schemas/amount_report.js#L7
Just do
return res.render(...)
insteadhttps://github.com/quangpl/cnpm-ezlife/blob/master/routes/page.js#L18
When you use
async/await
, if you don't havetry/catch
to handle errors, you don't need toreturn await ...
The text was updated successfully, but these errors were encountered: