I'm trying to use StandardJS to help with my linting (also because my supervisor asked me to). It is working great for the most part. However, today I started getting errors I haven't seen before, reporting that:
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
standard(brace-style)
This is the code causing the error:
if (err.status === 'not found') {
cb({ statusCode: 404 })
return
}
else { // THIS LINE causes the error
cb({ statusCode: 500 })
return
}
Why might I be getting this error, and how do I prevent it?
Note, I'm using StandardJS 8.6.0 on this project. The error is being produced both by Standard in project compilation, in in the VS Code IDE with the StandardJS extension installed. (And yes, I really made sure all my other curly braces are in the right places!)
}
for theif
. – Averroism