mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Enable callback-return rule
This commit is contained in:
parent
c65096020e
commit
c96b60d4d3
@ -4,6 +4,7 @@ module.exports = {
|
||||
|
||||
'arrow-body-style': [ 'error', 'as-needed', { requireReturnForObjectLiteral: false }],
|
||||
'capitalized-comments': [ 'error', 'always', { ignoreConsecutiveComments: true }],
|
||||
'callback-return': 'error',
|
||||
'consistent-this': 'error',
|
||||
curly: [ 'error', 'all' ],
|
||||
'default-case': 'error',
|
||||
|
@ -65,8 +65,8 @@ export class SliceStream extends Transform {
|
||||
this.binarySlice(chunk as Buffer);
|
||||
}
|
||||
|
||||
callback();
|
||||
this.source.resume();
|
||||
callback();
|
||||
}
|
||||
|
||||
protected binarySlice(chunk: Buffer): void {
|
||||
|
@ -62,7 +62,7 @@ function addPostListener(callback, formId = 'mainForm', errorId = 'error') {
|
||||
event.preventDefault();
|
||||
|
||||
try {
|
||||
await callback();
|
||||
return await callback();
|
||||
} catch (error) {
|
||||
setError(error.message, errorId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user