chore: Miscellaneous eslint fixes

/puter/packages/backend/src/om/entitystorage/ValidationES.js
  89:25  error  Do not assign to the exception parameter  no-ex-assign

/puter/packages/backend/src/om/proptypes/__all__.js
  166:17  warning  Unexpected 'debugger' statement  no-debugger

/puter/packages/backend/src/routers/_default.js
  405:31  error  'err' is not defined  no-undef
This commit is contained in:
Sam Atkins 2024-04-25 17:05:28 +01:00
parent 4879ee93bf
commit b4af28a91b
3 changed files with 3 additions and 2 deletions

View File

@ -86,6 +86,7 @@ class ValidationES extends BaseES {
} catch ( e ) {
if ( ! (e instanceof APIError) ) {
console.log('THIS IS HAPPENING', e);
// eslint-disable-next-line no-ex-assign
e = APIError.create('field_invalid', null, {
key: prop.name,
converted_from_another_error: true,

View File

@ -163,7 +163,7 @@ module.exports = {
},
async adapt (value, { descriptor }) {
if ( descriptor.debug ) {
debugger;
debugger; // eslint-disable-line no-debugger
}
if ( ! descriptor.service ) return value;
if ( ! value ) return null;

View File

@ -402,7 +402,7 @@ router.all('*', async function(req, res, next) {
});
} catch (e) {
console.error('error from sendFile', e);
return res.status(err.statusCode).send('Error /apps/')
return res.status(e.statusCode).send('Error /apps/')
}
}
// --------------------------------------