refactor: Add lint rules for no unused vars and unused import (#9940)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
/**
|
||||
* @interface AnalyticsAdapter
|
||||
* @module Adapters
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
|
||||
/**
|
||||
* @interface ParseAuthResponse
|
||||
|
||||
@@ -63,7 +63,7 @@ const getAppleKeyByKeyId = async (keyId, cacheMaxEntries, cacheMaxAge) => {
|
||||
let key;
|
||||
try {
|
||||
key = await authUtils.getSigningKey(client, keyId);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new Parse.Error(
|
||||
Parse.Error.OBJECT_NOT_FOUND,
|
||||
`Unable to find matching key for Key ID: ${keyId}`
|
||||
|
||||
@@ -122,7 +122,7 @@ const getFacebookKeyByKeyId = async (keyId, cacheMaxEntries, cacheMaxAge) => {
|
||||
let key;
|
||||
try {
|
||||
key = await authUtils.getSigningKey(client, keyId);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new Parse.Error(
|
||||
Parse.Error.OBJECT_NOT_FOUND,
|
||||
`Unable to find matching key for Key ID: ${keyId}`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
/**
|
||||
* @interface
|
||||
* @memberof module:Adapters
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
/**
|
||||
* @interface
|
||||
* @memberof module:Adapters
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
// Files Adapter
|
||||
//
|
||||
// Allows you to change the file storage mechanism.
|
||||
|
||||
@@ -171,7 +171,7 @@ export class GridFSBucketAdapter extends FilesAdapter {
|
||||
fileNamesNotRotated = fileNamesNotRotated.filter(function (value) {
|
||||
return value !== fileName;
|
||||
});
|
||||
} catch (err) {
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
/**
|
||||
* @interface
|
||||
* @memberof module:Adapters
|
||||
|
||||
@@ -42,7 +42,7 @@ function configureTransports(options) {
|
||||
parseServerError.name = 'parse-server-error';
|
||||
transports.push(parseServerError);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
/* */
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export function configureLogger({
|
||||
}
|
||||
try {
|
||||
fs.mkdirSync(logsFolder);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
/* */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
/**
|
||||
* @interface
|
||||
* @memberof module:Adapters
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
// @flow
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
// Push Adapter
|
||||
//
|
||||
// Allows you to change the push notification mechanism.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
import { WSSAdapter } from './WSSAdapter';
|
||||
const WebSocketServer = require('ws').Server;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
/* eslint-disable unused-imports/no-unused-vars */
|
||||
// WebSocketServer Adapter
|
||||
//
|
||||
// Adapter classes must implement the following functions:
|
||||
|
||||
Reference in New Issue
Block a user