refactor(core): Remove unused disable directives from backend packages (#10826)

This commit is contained in:
Iván Ovejero 2024-09-16 10:58:23 +02:00 committed by GitHub
parent 460fe14ae1
commit 0e61d7c2e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 5 deletions

View file

@ -14,7 +14,7 @@ import type { SourceControlledFile } from '../types/source-controlled-file';
// https://github.com/jestjs/jest/issues/4715
function deepSpyOn<O extends object, M extends keyof O>(object: O, methodName: M) {
const spy = jest.fn();
// eslint-disable-next-line @typescript-eslint/ban-types
const originalMethod = object[methodName];
if (typeof originalMethod !== 'function') {

View file

@ -21,12 +21,10 @@ function modifyUnderscoredKeys(
result[key] = modifier(input[key]);
}
} else {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
result[key] = input[key];
}
} else if (typeof input[key] === 'object') {
if (Array.isArray(input[key])) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
result[key] = input[key].map((item: any) => {
if (typeof item === 'object' && !Array.isArray(item)) {
return modifyUnderscoredKeys(item, modifier);

View file

@ -950,8 +950,6 @@ export class TelemetryEventRelay extends EventRelay {
}: RelayEventMap['user-submitted-personalization-survey']) {
const personalizationSurveyData = { user_id: userId } as Record<string, string | string[]>;
// ESlint is wrong here
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
for (const [camelCaseKey, value] of Object.entries(answers)) {
if (value) {
personalizationSurveyData[snakeCase(camelCaseKey)] = value;