mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #7986 from overleaf/jpa-eslint-8
[misc] upgrade eslint packages to the latest version everywhere GitOrigin-RevId: f1480d4a171acef82fb26c4aa54be3a6088b0ab3
This commit is contained in:
parent
81b935e317
commit
f0bd6dda23
145 changed files with 1023 additions and 1207 deletions
|
@ -76,7 +76,7 @@ class AccessTokenEncryptor {
|
|||
logger.err({ err }, 'error getting Fn key')
|
||||
return callback(err)
|
||||
}
|
||||
// eslint-disable-next-line node/no-deprecated-api
|
||||
// eslint-disable-next-line n/no-deprecated-api
|
||||
const decipher = crypto.createDecipher(ALGORITHM, key)
|
||||
const dec =
|
||||
decipher.update(cipherText, 'base64', 'utf8') + decipher.final('utf8')
|
||||
|
|
|
@ -79,7 +79,7 @@ describe('GcsPersistorTests', function () {
|
|||
|
||||
Stream = {
|
||||
pipeline: sinon.stub().yields(),
|
||||
Transform: Transform,
|
||||
Transform,
|
||||
}
|
||||
|
||||
GcsFile = {
|
||||
|
@ -222,7 +222,7 @@ describe('GcsPersistorTests', function () {
|
|||
})
|
||||
|
||||
it('stores the bucket and key in the error', function () {
|
||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
||||
expect(error.info).to.include({ bucketName: bucket, key })
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -252,7 +252,7 @@ describe('GcsPersistorTests', function () {
|
|||
})
|
||||
|
||||
it('stores the bucket and key in the error', function () {
|
||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
||||
expect(error.info).to.include({ bucketName: bucket, key })
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -66,7 +66,7 @@ describe('S3PersistorTests', function () {
|
|||
|
||||
Stream = {
|
||||
pipeline: sinon.stub().yields(),
|
||||
Transform: Transform,
|
||||
Transform,
|
||||
}
|
||||
|
||||
EmptyPromise = {
|
||||
|
@ -306,7 +306,7 @@ describe('S3PersistorTests', function () {
|
|||
})
|
||||
|
||||
it('stores the bucket and key in the error', function () {
|
||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
||||
expect(error.info).to.include({ bucketName: bucket, key })
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -336,7 +336,7 @@ describe('S3PersistorTests', function () {
|
|||
})
|
||||
|
||||
it('stores the bucket and key in the error', function () {
|
||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
||||
expect(error.info).to.include({ bucketName: bucket, key })
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -366,7 +366,7 @@ describe('S3PersistorTests', function () {
|
|||
})
|
||||
|
||||
it('stores the bucket and key in the error', function () {
|
||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
||||
expect(error.info).to.include({ bucketName: bucket, key })
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -52,7 +52,7 @@ describe('index', function () {
|
|||
ioredis: this.ioredis,
|
||||
},
|
||||
globals: {
|
||||
process: process,
|
||||
process,
|
||||
},
|
||||
})
|
||||
return (this.auth_pass = '1234 pass')
|
||||
|
|
1805
package-lock.json
generated
1805
package-lock.json
generated
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -2,16 +2,16 @@
|
|||
"name": "overleaf",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"eslint": "^7.21.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-config-standard": "^16.0.2",
|
||||
"eslint-plugin-chai-expect": "^2.2.0",
|
||||
"eslint-plugin-chai-friendly": "^0.6.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-mocha": "^8.0.0",
|
||||
"eslint": "^8.15.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-chai-expect": "^3.0.0",
|
||||
"eslint-plugin-chai-friendly": "^0.7.2",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-mocha": "^10.0.4",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"patch-package": "^6.4.7",
|
||||
"prettier": "2.5.1"
|
||||
},
|
||||
|
@ -33,6 +33,7 @@
|
|||
"services/filestore",
|
||||
"services/github-sync",
|
||||
"services/history-v1",
|
||||
"services/idp",
|
||||
"services/k8s-debugger",
|
||||
"services/notifications",
|
||||
"services/project-archiver",
|
||||
|
|
|
@ -81,7 +81,7 @@ module.exports = CommandRunner = {
|
|||
err.code = code
|
||||
return callback(err)
|
||||
} else {
|
||||
return callback(null, { stdout: stdout })
|
||||
return callback(null, { stdout })
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
no-return-assign,
|
||||
no-undef,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
camelcase,
|
||||
no-cond-assign,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
no-return-assign,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -32,8 +32,8 @@ class FSStream extends Stream {
|
|||
end = Math.min(end, this.length)
|
||||
// keep a cache of previous reads with {begin,end,buffer} values
|
||||
const result = {
|
||||
begin: begin,
|
||||
end: end,
|
||||
begin,
|
||||
end,
|
||||
buffer: Buffer.alloc(end - begin, 0),
|
||||
}
|
||||
this.cachedBytes.push(result)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
no-return-assign,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
no-console,
|
||||
no-return-assign,
|
||||
node/no-callback-literal,
|
||||
n/no-callback-literal,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
no-console,
|
||||
no-return-assign,
|
||||
node/no-callback-literal,
|
||||
n/no-callback-literal,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
no-console,
|
||||
no-return-assign,
|
||||
node/no-callback-literal,
|
||||
n/no-callback-literal,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -57,7 +57,7 @@ describe('FileController', function () {
|
|||
'./FileHandler': FileHandler,
|
||||
'./PersistorManager': PersistorManager,
|
||||
'./Errors': Errors,
|
||||
stream: stream,
|
||||
stream,
|
||||
'@overleaf/settings': settings,
|
||||
'@overleaf/metrics': {
|
||||
inc() {},
|
||||
|
@ -67,8 +67,8 @@ describe('FileController', function () {
|
|||
})
|
||||
|
||||
req = {
|
||||
key: key,
|
||||
bucket: bucket,
|
||||
key,
|
||||
bucket,
|
||||
project_id: projectId,
|
||||
query: {},
|
||||
params: {
|
||||
|
|
|
@ -83,7 +83,7 @@ describe('FileHandler', function () {
|
|||
'./ImageOptimiser': ImageOptimiser,
|
||||
'@overleaf/settings': Settings,
|
||||
'@overleaf/object-persistor': ObjectPersistor,
|
||||
fs: fs,
|
||||
fs,
|
||||
},
|
||||
globals: { console },
|
||||
})
|
||||
|
|
|
@ -255,7 +255,7 @@ module.exports = Router = {
|
|||
function (err, ...args) {
|
||||
if (err) {
|
||||
Router._handleError(callback, err, client, 'joinProject', {
|
||||
project_id: project_id,
|
||||
project_id,
|
||||
user_id: user._id,
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -150,7 +150,7 @@ exports.XMLHttpRequest = function () {
|
|||
}
|
||||
|
||||
settings = {
|
||||
method: method,
|
||||
method,
|
||||
url: url.toString(),
|
||||
async: typeof async !== 'boolean' ? true : async,
|
||||
user: user || null,
|
||||
|
@ -346,11 +346,11 @@ exports.XMLHttpRequest = function () {
|
|||
}
|
||||
|
||||
const options = {
|
||||
host: host,
|
||||
port: port,
|
||||
host,
|
||||
port,
|
||||
path: uri,
|
||||
method: settings.method,
|
||||
headers: headers,
|
||||
headers,
|
||||
}
|
||||
|
||||
// Reset error flag
|
||||
|
|
|
@ -260,8 +260,8 @@ module.exports = PackManager = {
|
|||
pack: { $each: newUpdates },
|
||||
},
|
||||
$inc: {
|
||||
n: n,
|
||||
sz: sz,
|
||||
n,
|
||||
sz,
|
||||
},
|
||||
$set: {
|
||||
'meta.end_ts': last.meta.end_ts,
|
||||
|
|
|
@ -219,6 +219,16 @@
|
|||
// - web/scripts/ukamf/package.json
|
||||
"import/no-extraneous-dependencies": ["error", {"packageDir": [".", "scripts/ukamf"]}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["scripts/learn/checkSanitize/*.js"],
|
||||
"rules": {
|
||||
// The checkSanitize script is used in the dev-env only.
|
||||
"import/no-extraneous-dependencies": ["error", {
|
||||
"devDependencies": true,
|
||||
"packageDir": [".", "../../"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ if (!module.parent) {
|
|||
|
||||
// handle SIGTERM for graceful shutdown in kubernetes
|
||||
process.on('SIGTERM', function (signal) {
|
||||
logger.warn({ signal: signal }, 'received signal, shutting down')
|
||||
logger.warn({ signal }, 'received signal, shutting down')
|
||||
Settings.shuttingDown = true
|
||||
})
|
||||
|
||||
|
|
|
@ -405,7 +405,7 @@ const AuthenticationController = {
|
|||
if (!adminDomains.find(domain => email.endsWith(`@${domain}`))) {
|
||||
return next(
|
||||
new OError('[ValidateAdmin] Admin user with invalid email domain', {
|
||||
email: email,
|
||||
email,
|
||||
userId: user._id,
|
||||
})
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -44,7 +44,7 @@ async function removeUserFromProject(projectId, userId) {
|
|||
await Project.updateOne(
|
||||
{ _id: projectId },
|
||||
{
|
||||
$set: { archived: archived },
|
||||
$set: { archived },
|
||||
$pull: {
|
||||
collaberator_refs: userId,
|
||||
readOnly_refs: userId,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -876,7 +876,7 @@ const ClsiManager = {
|
|||
compileGroup: options.compileGroup,
|
||||
enablePdfCaching:
|
||||
(Settings.enablePdfCaching && options.enablePdfCaching) || false,
|
||||
flags: flags,
|
||||
flags,
|
||||
metricsMethod: options.compileGroup,
|
||||
},
|
||||
rootResourcePath,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ module.exports = CompileController = {
|
|||
Metrics.inc('compile-error')
|
||||
return next(error)
|
||||
}
|
||||
Metrics.inc('compile-status', 1, { status: status })
|
||||
Metrics.inc('compile-status', 1, { status })
|
||||
res.json({
|
||||
status,
|
||||
outputFiles,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-dupe-keys,
|
||||
no-unused-vars,
|
||||
|
|
|
@ -34,7 +34,7 @@ function handleGeneric400Error(req, res, statusCode, message, info = {}) {
|
|||
case 'html':
|
||||
return res.render('general/400', {
|
||||
title: 'Client Error',
|
||||
message: message,
|
||||
message,
|
||||
})
|
||||
case 'json':
|
||||
return renderJSONError(res, message, info)
|
||||
|
@ -86,7 +86,7 @@ module.exports = HttpErrorHandler = {
|
|||
case 'html':
|
||||
return res.render('general/400', {
|
||||
title: 'Client Error',
|
||||
message: message,
|
||||
message,
|
||||
})
|
||||
case 'json':
|
||||
return renderJSONError(res, message, info)
|
||||
|
@ -125,7 +125,7 @@ module.exports = HttpErrorHandler = {
|
|||
case 'html':
|
||||
return res.render('general/400', {
|
||||
title: 'Client Error',
|
||||
message: message,
|
||||
message,
|
||||
})
|
||||
case 'json':
|
||||
return renderJSONError(res, message, info)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,7 @@ module.exports = InactiveProjectManager = {
|
|||
function (err) {
|
||||
if (err) {
|
||||
logger.err(
|
||||
{ project_id: project._id, err: err },
|
||||
{ project_id: project._id, err },
|
||||
'unable to deactivate project'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ function makeAffiliationRequest(options, callback) {
|
|||
message: 'error getting affiliations from v1',
|
||||
info: {
|
||||
status: response.statusCode,
|
||||
body: body,
|
||||
body,
|
||||
},
|
||||
})
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-cond-assign,
|
||||
*/
|
||||
|
|
|
@ -203,7 +203,7 @@ function tpdsFileLimit(userId) {
|
|||
callback = function () {}
|
||||
}
|
||||
const messageOpts = {
|
||||
projectName: projectName,
|
||||
projectName,
|
||||
}
|
||||
NotificationsHandler.createNotification(
|
||||
userId,
|
||||
|
|
|
@ -14,7 +14,7 @@ function generateAndEmailResetToken(email, callback) {
|
|||
if (user.email !== email) {
|
||||
return callback(null, 'secondary')
|
||||
}
|
||||
const data = { user_id: user._id.toString(), email: email }
|
||||
const data = { user_id: user._id.toString(), email }
|
||||
OneTimeTokenHandler.getNewToken('password', data, (err, token) => {
|
||||
if (err) {
|
||||
return callback(err)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1055,7 +1055,7 @@ const ProjectController = {
|
|||
last_name: user.last_name,
|
||||
referal_id: user.referal_id,
|
||||
signUpDate: user.signUpDate,
|
||||
allowedFreeTrial: allowedFreeTrial,
|
||||
allowedFreeTrial,
|
||||
featureSwitches: user.featureSwitches,
|
||||
features: user.features,
|
||||
refProviders: _.mapValues(user.refProviders, Boolean),
|
||||
|
|
|
@ -126,7 +126,7 @@ async function archiveProject(projectId, userId) {
|
|||
|
||||
await Project.updateOne(
|
||||
{ _id: projectId },
|
||||
{ $set: { archived: archived }, $pull: { trashed: ObjectId(userId) } }
|
||||
{ $set: { archived }, $pull: { trashed: ObjectId(userId) } }
|
||||
)
|
||||
} catch (err) {
|
||||
logger.warn({ err }, 'problem archiving project')
|
||||
|
@ -147,10 +147,7 @@ async function unarchiveProject(projectId, userId) {
|
|||
'UNARCHIVE'
|
||||
)
|
||||
|
||||
await Project.updateOne(
|
||||
{ _id: projectId },
|
||||
{ $set: { archived: archived } }
|
||||
)
|
||||
await Project.updateOne({ _id: projectId }, { $set: { archived } })
|
||||
} catch (err) {
|
||||
logger.warn({ err }, 'problem unarchiving project')
|
||||
throw err
|
||||
|
@ -174,7 +171,7 @@ async function trashProject(projectId, userId) {
|
|||
{ _id: projectId },
|
||||
{
|
||||
$addToSet: { trashed: ObjectId(userId) },
|
||||
$set: { archived: archived },
|
||||
$set: { archived },
|
||||
}
|
||||
)
|
||||
} catch (err) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
no-useless-escape,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
no-unused-vars,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -132,7 +132,7 @@ function updateSubscription(user, planCode, couponCode, callback) {
|
|||
const timeframe = changeAtTermEnd ? 'term_end' : 'now'
|
||||
RecurlyClient.changeSubscriptionByUuid(
|
||||
subscription.recurlySubscription_id,
|
||||
{ planCode: planCode, timeframe: timeframe },
|
||||
{ planCode, timeframe },
|
||||
function (error, subscriptionChange) {
|
||||
if (error != null) {
|
||||
return cb(error)
|
||||
|
|
|
@ -192,7 +192,7 @@ async function createDeletedSubscription(subscription, deleterData) {
|
|||
deleterId: deleterData.id,
|
||||
deleterIpAddress: deleterData.ip,
|
||||
},
|
||||
subscription: subscription,
|
||||
subscription,
|
||||
}
|
||||
const options = { upsert: true, new: true, setDefaultsOnInsert: true }
|
||||
await DeletedSubscription.findOneAndUpdate(filter, data, options).exec()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
@ -155,7 +155,7 @@ module.exports = V1SubscriptionManager = {
|
|||
message: 'error from v1',
|
||||
info: {
|
||||
status: response.statusCode,
|
||||
body: body,
|
||||
body,
|
||||
},
|
||||
})
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-return-assign,
|
||||
*/
|
||||
|
|
|
@ -141,7 +141,7 @@ async function createNewUser(attributes, options = {}) {
|
|||
const UserCreator = {
|
||||
createNewUser: util.callbackify(createNewUser),
|
||||
promises: {
|
||||
createNewUser: createNewUser,
|
||||
createNewUser,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ module.exports = {
|
|||
expireDeletedUsersAfterDuration: callbackify(expireDeletedUsersAfterDuration),
|
||||
|
||||
promises: {
|
||||
deleteUser: deleteUser,
|
||||
deleteMongoUser: deleteMongoUser,
|
||||
expireDeletedUser: expireDeletedUser,
|
||||
ensureCanDeleteUser: ensureCanDeleteUser,
|
||||
expireDeletedUsersAfterDuration: expireDeletedUsersAfterDuration,
|
||||
deleteUser,
|
||||
deleteMongoUser,
|
||||
expireDeletedUser,
|
||||
ensureCanDeleteUser,
|
||||
expireDeletedUsersAfterDuration,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ async function _createDeletedUser(user, options) {
|
|||
await DeletedUser.updateOne(
|
||||
{ 'deleterData.deletedUserId': user._id },
|
||||
{
|
||||
user: user,
|
||||
user,
|
||||
deleterData: {
|
||||
deletedAt: new Date(),
|
||||
deleterId: options.deleterUser ? options.deleterUser._id : undefined,
|
||||
|
|
|
@ -193,7 +193,7 @@ const UserEmailsController = {
|
|||
if (err) {
|
||||
return UserEmailsController._handleEmailError(err, req, res, next)
|
||||
}
|
||||
SessionManager.setInSessionUser(req.session, { email: email })
|
||||
SessionManager.setInSessionUser(req.session, { email })
|
||||
const user = SessionManager.getSessionUser(req.session)
|
||||
UserSessionsManager.revokeAllUserSessions(
|
||||
user,
|
||||
|
|
|
@ -131,7 +131,7 @@ async function settingsPage(req, res) {
|
|||
reconfirmedViaSAML,
|
||||
reconfirmationRemoveEmail,
|
||||
samlBeta: req.session.samlBeta,
|
||||
ssoError: ssoError,
|
||||
ssoError,
|
||||
thirdPartyIds: UserPagesController._restructureThirdPartyIds(user),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -69,7 +69,7 @@ const V1Api = {
|
|||
return callback(
|
||||
new Errors.V1ConnectionError({
|
||||
message: 'error from V1 API',
|
||||
info: { status: response.statusCode, body: body },
|
||||
info: { status: response.statusCode, body },
|
||||
})
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -21,8 +21,8 @@ function checkValidationToken(req) {
|
|||
} else {
|
||||
logger.error(
|
||||
{
|
||||
sessionToken: sessionToken,
|
||||
clientToken: clientToken,
|
||||
sessionToken,
|
||||
clientToken,
|
||||
},
|
||||
'session token validation failed'
|
||||
)
|
||||
|
|
|
@ -156,7 +156,7 @@ export function ChatProvider({ children }) {
|
|||
.catch(error => {
|
||||
dispatch({
|
||||
type: 'ERROR',
|
||||
error: error,
|
||||
error,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ export function ChatProvider({ children }) {
|
|||
}).catch(error => {
|
||||
dispatch({
|
||||
type: 'ERROR',
|
||||
error: error,
|
||||
error,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@ function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) {
|
|||
const { t } = useTranslation()
|
||||
const classes = classNames('btn', 'btn-full-height', {
|
||||
active: trackChangesIsOpen && !disabled,
|
||||
disabled: disabled,
|
||||
disabled,
|
||||
})
|
||||
|
||||
return (
|
||||
|
|
|
@ -97,7 +97,7 @@ document.querySelectorAll('[data-ol-purchase-group-plan]').forEach(el =>
|
|||
eventTracking.sendMB('groups-modal-click', {
|
||||
plan: planCode,
|
||||
users: size,
|
||||
currency: currency,
|
||||
currency,
|
||||
type: usage,
|
||||
})
|
||||
const url = new URL('/user/subscription/new', window.origin)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash'
|
||||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-return-assign,
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-dupe-class-members,
|
||||
no-return-assign,
|
||||
|
|
|
@ -401,7 +401,7 @@ export default HistoryManager = (function () {
|
|||
if (currentUpdate != null) {
|
||||
for (const pathname of currentUpdate.pathnames) {
|
||||
filesWithOps.push({
|
||||
pathname: pathname,
|
||||
pathname,
|
||||
operation: 'edited',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-return-assign,
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@ App.directive('addCommentEntry', () => ({
|
|||
link(scope, element, attrs) {
|
||||
scope.state = {
|
||||
isAdding: false,
|
||||
content: content,
|
||||
content,
|
||||
}
|
||||
|
||||
scope.$on('comment:start_adding', () => scope.startNewComment())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-return-assign,
|
||||
*/
|
||||
|
|
|
@ -36,14 +36,14 @@ class Adapter {
|
|||
|
||||
async markExecuted(name) {
|
||||
return db.migrations.insertOne({
|
||||
name: name,
|
||||
name,
|
||||
migratedAt: new Date(),
|
||||
})
|
||||
}
|
||||
|
||||
async unmarkExecuted(name) {
|
||||
return db.migrations.deleteOne({
|
||||
name: name,
|
||||
name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -237,21 +237,11 @@
|
|||
"cypress": "^9.5.1",
|
||||
"es6-promise": "^4.2.8",
|
||||
"escodegen": "^2.0.0",
|
||||
"eslint": "^8.9.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"eslint-config-standard-jsx": "^11.0.0-0",
|
||||
"eslint-plugin-chai-expect": "^2.2.0",
|
||||
"eslint-plugin-chai-friendly": "^0.7.2",
|
||||
"eslint-plugin-cypress": "^2.12.1",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-mocha": "^9.0.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-react": "^7.27.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"eslint-plugin-standard": "^5.0.0",
|
||||
"expose-loader": "^3.1.0",
|
||||
"fetch-mock": "^9.10.2",
|
||||
"glob": "^7.1.6",
|
||||
|
@ -280,7 +270,6 @@
|
|||
"nodemon": "^2.0.6",
|
||||
"pirates": "^4.0.1",
|
||||
"postcss-loader": "^6.2.1",
|
||||
"prettier": "2.5.1",
|
||||
"requirejs": "^2.3.6",
|
||||
"samlp": "^3.4.1",
|
||||
"sandboxed-module": "https://github.com/overleaf/node-sandboxed-module/archive/cafa2d60f17ce75cc023e6f296eb8de79d92d35d.tar.gz",
|
||||
|
|
|
@ -56,7 +56,7 @@ async function setArchived(collection, project) {
|
|||
return collection.updateOne(
|
||||
{ _id: project._id },
|
||||
{
|
||||
$set: { archived: archived },
|
||||
$set: { archived },
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
camelcase,
|
||||
max-len,
|
||||
no-unused-vars,
|
||||
node/no-deprecated-api,
|
||||
n/no-deprecated-api,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
no-return-assign,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
|
|
@ -8,14 +8,14 @@ describe('mongoose', function () {
|
|||
const email = 'wombat@potato.net'
|
||||
|
||||
it('allows the creation of a user', async function () {
|
||||
await expect(User.create({ email: email })).to.be.fulfilled
|
||||
await expect(User.findOne({ email: email })).to.eventually.exist
|
||||
await expect(User.create({ email })).to.be.fulfilled
|
||||
await expect(User.findOne({ email })).to.eventually.exist
|
||||
})
|
||||
|
||||
it('does not allow the creation of multiple users with the same email', async function () {
|
||||
await expect(User.create({ email: email })).to.be.fulfilled
|
||||
await expect(User.create({ email: email })).to.be.rejected
|
||||
await expect(User.countDocuments({ email: email })).to.eventually.equal(1)
|
||||
await expect(User.create({ email })).to.be.fulfilled
|
||||
await expect(User.create({ email })).to.be.rejected
|
||||
await expect(User.countDocuments({ email })).to.eventually.equal(1)
|
||||
})
|
||||
|
||||
it('formats assignedAt as Date', async function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
max-len,
|
||||
no-return-assign,
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable
|
||||
node/handle-callback-err,
|
||||
n/handle-callback-err,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
|
|
|
@ -25,7 +25,7 @@ const _expect204 = (err, response) => {
|
|||
}
|
||||
|
||||
const _createTag = (user, name, callback) => {
|
||||
user.request.post({ url: `/tag`, json: { name: name } }, callback)
|
||||
user.request.post({ url: `/tag`, json: { name } }, callback)
|
||||
}
|
||||
|
||||
const _createTags = (user, tagNames, callback) => {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue