Skip to content

Commit

Permalink
@uppy/companion: harden lint rules (#4641)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Aug 22, 2023
1 parent 3205cc3 commit 8bc1c2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
12 changes: 0 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/server/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8bc1c2c

Please sign in to comment.