Skip to content

Commit 5526f0a

Browse files
joker23claude
andcommitted
chore: remove stale eslint-disable comments
Remove ~65 eslint-disable comments for rules that no longer exist after replacing eslint-config-airbnb-base with eslint:recommended: - no-param-reassign (43 comments) - no-bitwise (10 comments) - no-restricted-syntax for ForOfStatement (11 comments) - no-plusplus (4 comments) - no-continue (1 comment) Retains a targeted no-restricted-syntax disable in vendor TraceKit.ts for a legitimate for...in loop. No functional code changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent be5cd04 commit 5526f0a

31 files changed

Lines changed: 1 addition & 68 deletions

File tree

packages/sdk/browser/__tests__/platform/randomUuidV4.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-bitwise */
21
import { fallbackUuidV4, formatDataAsUuidV4 } from '../../src/platform/randomUuidV4';
32

43
it('formats conformant UUID', () => {

packages/sdk/browser/tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default defineConfig({
2020
// So start of line followed by a character that isn't followed by m or underscore, but we
2121
// want other things that do start with m, so we need to progressively handle more characters
2222
// of meta with exclusions.
23-
// eslint-disable-next-line no-param-reassign
2423
opts.mangleProps = /^_([^m|_]|m[^e]|me[^t]|met[^a])/;
2524
},
2625
});

packages/sdk/combined-browser/tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default defineConfig({
2626
// So start of line followed by a character that isn't followed by m or underscore, but we
2727
// want other things that do start with m, so we need to progressively handle more characters
2828
// of meta with exclusions.
29-
// eslint-disable-next-line no-param-reassign
3029
opts.mangleProps = /^_([^m|_]|m[^e]|me[^t]|met[^a])/;
3130
},
3231
});

packages/sdk/electron/__tests__/platform/HeaderWrapper.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-restricted-syntax */
2-
// The header interface uses generators, so we are using restricted-syntax.
31
import * as http from 'http';
42

53
import HeaderWrapper from '../../src/platform/HeaderWrapper';

packages/sdk/electron/src/ElectronClient.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -201,24 +201,20 @@ export class ElectronClient extends LDClientImpl {
201201
);
202202

203203
ipcMain.on(getIPCChannelName(namespace, 'allFlags'), (event) => {
204-
// eslint-disable-next-line no-param-reassign
205204
event.returnValue = this.allFlags();
206205
});
207206

208207
ipcMain.on(getIPCChannelName(namespace, 'boolVariation'), (event, key, defaultValue) => {
209-
// eslint-disable-next-line no-param-reassign
210208
event.returnValue = this.boolVariation(key, defaultValue);
211209
});
212210

213211
ipcMain.on(getIPCChannelName(namespace, 'boolVariationDetail'), (event, key, defaultValue) => {
214-
// eslint-disable-next-line no-param-reassign
215212
event.returnValue = this.boolVariationDetail(key, defaultValue);
216213
});
217214

218215
ipcMain.handle(getIPCChannelName(namespace, 'flush'), (_event) => this.flush());
219216

220217
ipcMain.on(getIPCChannelName(namespace, 'getContext'), (event) => {
221-
// eslint-disable-next-line no-param-reassign
222218
event.returnValue = this.getContext();
223219
});
224220

@@ -233,53 +229,44 @@ export class ElectronClient extends LDClientImpl {
233229
});
234230

235231
ipcMain.on(getIPCChannelName(namespace, 'jsonVariation'), (event, key, defaultValue) => {
236-
// eslint-disable-next-line no-param-reassign
237232
event.returnValue = this.jsonVariation(key, defaultValue);
238233
});
239234

240235
ipcMain.on(getIPCChannelName(namespace, 'jsonVariationDetail'), (event, key, defaultValue) => {
241-
// eslint-disable-next-line no-param-reassign
242236
event.returnValue = this.jsonVariationDetail(key, defaultValue);
243237
});
244238

245239
ipcMain.on(getIPCChannelName(namespace, 'numberVariation'), (event, key, defaultValue) => {
246-
// eslint-disable-next-line no-param-reassign
247240
event.returnValue = this.numberVariation(key, defaultValue);
248241
});
249242

250243
ipcMain.on(
251244
getIPCChannelName(namespace, 'numberVariationDetail'),
252245
(event, key, defaultValue) => {
253-
// eslint-disable-next-line no-param-reassign
254246
event.returnValue = this.numberVariationDetail(key, defaultValue);
255247
},
256248
);
257249

258250
ipcMain.on(getIPCChannelName(namespace, 'stringVariation'), (event, key, defaultValue) => {
259-
// eslint-disable-next-line no-param-reassign
260251
event.returnValue = this.stringVariation(key, defaultValue);
261252
});
262253

263254
ipcMain.on(
264255
getIPCChannelName(namespace, 'stringVariationDetail'),
265256
(event, key, defaultValue) => {
266-
// eslint-disable-next-line no-param-reassign
267257
event.returnValue = this.stringVariationDetail(key, defaultValue);
268258
},
269259
);
270260

271261
ipcMain.on(getIPCChannelName(namespace, 'track'), (event, key, data, metricValue) => {
272-
// eslint-disable-next-line no-param-reassign
273262
event.returnValue = this.track(key, data, metricValue);
274263
});
275264

276265
ipcMain.on(getIPCChannelName(namespace, 'variation'), (event, key, defaultValue) => {
277-
// eslint-disable-next-line no-param-reassign
278266
event.returnValue = this.variation(key, defaultValue);
279267
});
280268

281269
ipcMain.on(getIPCChannelName(namespace, 'variationDetail'), (event, key, defaultValue) => {
282-
// eslint-disable-next-line no-param-reassign
283270
event.returnValue = this.variationDetail(key, defaultValue);
284271
});
285272

@@ -288,12 +275,10 @@ export class ElectronClient extends LDClientImpl {
288275
);
289276

290277
ipcMain.on(getIPCChannelName(namespace, 'getConnectionMode'), (event) => {
291-
// eslint-disable-next-line no-param-reassign
292278
event.returnValue = this.getConnectionMode();
293279
});
294280

295281
ipcMain.on(getIPCChannelName(namespace, 'isOffline'), (event) => {
296-
// eslint-disable-next-line no-param-reassign
297282
event.returnValue = this.isOffline();
298283
});
299284
}
@@ -343,14 +328,12 @@ export class ElectronClient extends LDClientImpl {
343328
private _applyRemove(event: IpcMainEvent, callbackId: string): void {
344329
const eventName = this._ipcCallbackIdToEventName!.get(callbackId);
345330
if (!eventName) {
346-
// eslint-disable-next-line no-param-reassign
347331
event.returnValue = false;
348332
return;
349333
}
350334
const entry = this._ipcEventSubscriptions!.get(eventName);
351335
const port = entry?.ports.get(callbackId);
352336
if (!entry || !port) {
353-
// eslint-disable-next-line no-param-reassign
354337
event.returnValue = false;
355338
return;
356339
}
@@ -361,7 +344,6 @@ export class ElectronClient extends LDClientImpl {
361344
this.off(eventName, entry.broadcastCallback);
362345
this._ipcEventSubscriptions!.delete(eventName);
363346
}
364-
// eslint-disable-next-line no-param-reassign
365347
event.returnValue = true;
366348
}
367349

packages/sdk/electron/src/platform/HeaderWrapper.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default class HeaderWrapper implements platform.Headers {
3535
// We want to use generators here for the simplicity of maintaining
3636
// this interface. Also they aren't expected to be high frequency usage.
3737
*values(): Iterable<string> {
38-
// eslint-disable-next-line no-restricted-syntax
3938
for (const key of this.keys()) {
4039
const val = this.get(key);
4140
if (val !== null) {
@@ -45,7 +44,6 @@ export default class HeaderWrapper implements platform.Headers {
4544
}
4645

4746
*entries(): Iterable<[string, string]> {
48-
// eslint-disable-next-line no-restricted-syntax
4947
for (const key of this.keys()) {
5048
const val = this.get(key);
5149
if (val !== null) {

packages/sdk/electron/tsup.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export default defineConfig([
2121
// So start of line followed by a character that isn't followed by m or underscore, but we
2222
// want other things that do start with m, so we need to progressively handle more characters
2323
// of meta with exclusions.
24-
// eslint-disable-next-line no-param-reassign
2524
opts.mangleProps = /^_([^m|_]|m[^e]|me[^t]|met[^a])/;
2625
},
2726
}]);

packages/sdk/fastly/tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default defineConfig({
2020
// So start of line followed by a character that isn't followed by m or underscore, but we
2121
// want other things that do start with m, so we need to progressively handle more characters
2222
// of meta with exclusions.
23-
// eslint-disable-next-line no-param-reassign
2423
opts.mangleProps = /^_([^m|_]|m[^e]|me[^t]|met[^a])/;
2524
},
2625
});

packages/sdk/react-native/src/fromExternal/react-native-sse/EventSource.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ export default class EventSource<E extends string = never> {
278278
let retry = 0;
279279
let line = '';
280280

281-
// eslint-disable-next-line no-plusplus
282281
for (let i = 0; i < parts.length; i++) {
283282
line = parts[i].replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g, '');
284283
if (line.indexOf('event') === 0) {

packages/sdk/react-native/src/platform/crypto/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { Crypto, Hmac } from '@launchdarkly/js-client-sdk-common';
33
import PlatformHasher from './PlatformHasher';
44
import { SupportedHashAlgorithm } from './types';
55

6-
/* eslint-disable no-bitwise */
76
/**
87
* To avoid dependencies on uuid, this is good enough for now.
98
* Ripped from the react-native repo:

0 commit comments

Comments
 (0)