mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
@uppy/companion: harden lint rules (#4641)
This commit is contained in:
parent
3205cc3500
commit
8bc1c2cd0e
3 changed files with 1 additions and 14 deletions
12
.eslintrc.js
12
.eslintrc.js
|
|
@ -335,18 +335,6 @@ module.exports = {
|
|||
files: ['./packages/@uppy/companion/**/*.js'],
|
||||
rules: {
|
||||
'no-underscore-dangle': 'off',
|
||||
|
||||
// transloadit rules we would like to enforce in the future
|
||||
// but will require separate PRs to gradually get there
|
||||
// and so the meantime: just warn
|
||||
'class-methods-use-this': 'warn',
|
||||
'consistent-return': 'warn',
|
||||
'global-require': 'warn',
|
||||
'import/order': 'warn',
|
||||
'no-param-reassign': 'warn',
|
||||
'no-redeclare': 'warn',
|
||||
'no-shadow': 'warn',
|
||||
'no-use-before-define': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const { stat, unlink } = fs.promises
|
|||
// @ts-ignore - typescript resolves this this to a hoisted version of
|
||||
// serialize-error that ships with a declaration file, we are using a version
|
||||
// here that does not have a declaration file
|
||||
const serializeError = require('serialize-error')
|
||||
const serializeError = require('serialize-error') // eslint-disable-line import/order
|
||||
const emitter = require('./emitter')
|
||||
const { jsonStringify, hasMatch } = require('./helpers/utils')
|
||||
const logger = require('./logger')
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ async function deauthCallback ({ body, companion, headers }, res, next) {
|
|||
try {
|
||||
const { data, status } = await companion.provider.deauthorizationCallback({ companion, body, headers })
|
||||
res.status(status || 200).json(data)
|
||||
return
|
||||
} catch (err) {
|
||||
if (respondWithError(err, res)) return
|
||||
next(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue