Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
'**/fromExternal/**',
],
rules: {
'no-param-reassign': 'error',
'eqeqeq': ['error', 'always', { null: 'ignore' }],
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
'no-var': 'error',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-bitwise */
import { fallbackUuidV4, formatDataAsUuidV4 } from '../../src/platform/randomUuidV4';

it('formats conformant UUID', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-restricted-syntax */
// The header interface uses generators, so we are using restricted-syntax.
import * as http from 'http';

import HeaderWrapper from '../../src/platform/HeaderWrapper';
Expand Down
2 changes: 0 additions & 2 deletions packages/sdk/electron/src/platform/HeaderWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class HeaderWrapper implements platform.Headers {
// We want to use generators here for the simplicity of maintaining
// this interface. Also they aren't expected to be high frequency usage.
*values(): Iterable<string> {
// eslint-disable-next-line no-restricted-syntax
for (const key of this.keys()) {
const val = this.get(key);
if (val !== null) {
Expand All @@ -45,7 +44,6 @@ export default class HeaderWrapper implements platform.Headers {
}

*entries(): Iterable<[string, string]> {
// eslint-disable-next-line no-restricted-syntax
for (const key of this.keys()) {
const val = this.get(key);
if (val !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export default class EventSource<E extends string = never> {
let retry = 0;
let line = '';

// eslint-disable-next-line no-plusplus
for (let i = 0; i < parts.length; i++) {
line = parts[i].replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g, '');
if (line.indexOf('event') === 0) {
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/react-native/src/platform/crypto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { Crypto, Hmac } from '@launchdarkly/js-client-sdk-common';
import PlatformHasher from './PlatformHasher';
import { SupportedHashAlgorithm } from './types';

/* eslint-disable no-bitwise */
/**
* To avoid dependencies on uuid, this is good enough for now.
* Ripped from the react-native repo:
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/react-native/src/polyfills/btoa.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-bitwise */
import { fromByteArray } from 'base64-js';

import toUtf8Array from './toUtf8Array';
Expand Down
3 changes: 0 additions & 3 deletions packages/sdk/react-native/src/polyfills/toUtf8Array.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable no-plusplus */
/* eslint-disable no-bitwise */

// Originally from: https://github.com/google/closure-library/blob/a1f5a029c1b32eb4793a2d920aa52abc085e1bf7/closure/goog/crypt/crypt.js

// Once React Native versions uniformly support TextEncoder this code can be removed.
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/react-native/src/polyfills/uuid.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-bitwise */
/**
* To avoid dependencies on uuid, this is good enough for now.
* Ripped from the react-native repo:
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/server-ai/examples/vercel-ai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ async function main() {
);

// Consume the stream immediately - no await needed before this!
// eslint-disable-next-line no-restricted-syntax
for await (const textPart of streamResult.textStream) {
process.stdout.write(textPart);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export class AIProviderFactory {
const providersToTry = this._getProvidersToTry(defaultAiProvider, providerName);

// Try each provider in order
// eslint-disable-next-line no-restricted-syntax
for (const providerType of providersToTry) {
logger?.debug(
`Attempting to create AIProvider for: ${aiConfig.provider?.name} with provider type: ${providerType}`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-restricted-syntax */
// The header interface uses generators, so we are using restricted-syntax.
import * as http from 'http';

import HeaderWrapper from '../../src/platform/HeaderWrapper';
Expand Down
2 changes: 0 additions & 2 deletions packages/sdk/server-node/src/platform/HeaderWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class HeaderWrapper implements platform.Headers {
// We want to use generators here for the simplicity of maintaining
// this interface. Also they aren't expected to be high frequency usage.
*values(): Iterable<string> {
// eslint-disable-next-line no-restricted-syntax
for (const key of this.keys()) {
const val = this.get(key);
if (val !== null) {
Expand All @@ -45,7 +44,6 @@ export default class HeaderWrapper implements platform.Headers {
}

*entries(): Iterable<[string, string]> {
// eslint-disable-next-line no-restricted-syntax
for (const key of this.keys()) {
const val = this.get(key);
if (val !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default async function clearPrefix(table: string, prefix?: string) {
const deleteOps: WriteRequest[] = [];

// Using a generator here is a substantial ergonomic improvement and this is a test file.
// eslint-disable-next-line no-restricted-syntax
for await (const page of paginateScan(
{ client },
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export default class DynamoDBClientState {
async query(params: QueryCommandInput): Promise<Record<string, AttributeValue>[]> {
const records: Record<string, AttributeValue>[] = [];
// Using a generator here is a substantial ergonomic improvement.
// eslint-disable-next-line no-restricted-syntax
for await (const page of paginateQuery({ client: this._client }, params)) {
if (page.Items) {
records.push(...page.Items);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-bitwise */
import { fallbackUuidV4, formatDataAsUuidV4 } from '../src/randomUuidV4';

it('formats conformant UUID', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { getTraceKit } from '../../../src/vendor/TraceKit';
import * as CapturedExceptions from './CapturedExceptions';

/* eslint-disable no-plusplus */
/* eslint-disable no-useless-escape */
/* eslint-disable @typescript-eslint/no-use-before-define */

Expand Down
6 changes: 2 additions & 4 deletions packages/telemetry/browser-telemetry/src/vendor/TraceKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@
/* eslint-disable func-names */
/* eslint-disable no-shadow-restricted-names */
/* eslint-disable prefer-destructuring */
/* eslint-disable no-param-reassign */
/* eslint-disable no-cond-assign */
/* eslint-disable consistent-return */
/* eslint-disable no-empty */
/* eslint-disable no-plusplus */
/* eslint-disable prefer-rest-params */
/* eslint-disable no-useless-escape */
/* eslint-disable no-restricted-syntax */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-use-before-define */
/* eslint-disable no-continue */
/* eslint-disable no-underscore-dangle */
/* eslint-disable no-param-reassign */

/**
* Source context information.
Expand Down Expand Up @@ -805,6 +802,7 @@ export interface StackTrace {
const inlineScriptBlocks = [];
let parts: any;

// eslint-disable-next-line no-restricted-syntax
for (const s in scripts) {
if (_has(scripts, s) && !scripts[s].src) {
inlineScriptBlocks.push(scripts[s]);
Expand Down
Loading