Skip to content

Commit d7da04a

Browse files
committed
Update
[ghstack-poisoned]
2 parents 8ffedae + 2192198 commit d7da04a

File tree

66 files changed

+44
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+44
-148
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = {
1717
// Stop ESLint from looking for a configuration file in parent folders
1818
root: true,
1919

20+
reportUnusedDisableDirectives: true,
21+
2022
plugins: [
2123
'babel',
2224
'ft-flow',

packages/react-client/src/ReactFlightClient.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,6 @@ function resolveHint<Code: HintCode>(
18391839
dispatchHint(code, hintModel);
18401840
}
18411841

1842-
// eslint-disable-next-line react-internal/no-production-logging
18431842
const supportsCreateTask =
18441843
__DEV__ && enableOwnerStacks && !!(console: any).createTask;
18451844

@@ -1977,7 +1976,6 @@ function initializeFakeTask(
19771976
? null
19781977
: initializeFakeTask(response, componentInfo.owner);
19791978

1980-
// eslint-disable-next-line react-internal/no-production-logging
19811979
const createTaskFn = (console: any).createTask.bind(
19821980
console,
19831981
getServerComponentTaskName(componentInfo),

packages/react-client/src/ReactFlightReplyClient.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,11 @@ export function processReply(
227227
function progress(entry: {done: boolean, value: ReactServerValue, ...}) {
228228
if (entry.done) {
229229
const blobId = nextPartId++;
230-
// eslint-disable-next-line react-internal/safe-string-coercion
231230
data.append(formFieldPrefix + blobId, new Blob(buffer));
232-
// eslint-disable-next-line react-internal/safe-string-coercion
233231
data.append(
234232
formFieldPrefix + streamId,
235233
'"$o' + blobId.toString(16) + '"',
236234
);
237-
// eslint-disable-next-line react-internal/safe-string-coercion
238235
data.append(formFieldPrefix + streamId, 'C'); // Close signal
239236
pendingParts--;
240237
if (pendingParts === 0) {
@@ -262,7 +259,6 @@ export function processReply(
262259

263260
function progress(entry: {done: boolean, value: ReactServerValue, ...}) {
264261
if (entry.done) {
265-
// eslint-disable-next-line react-internal/safe-string-coercion
266262
data.append(formFieldPrefix + streamId, 'C'); // Close signal
267263
pendingParts--;
268264
if (pendingParts === 0) {
@@ -272,7 +268,6 @@ export function processReply(
272268
try {
273269
// $FlowFixMe[incompatible-type]: While plain JSON can return undefined we never do here.
274270
const partJSON: string = JSON.stringify(entry.value, resolveToJSON);
275-
// eslint-disable-next-line react-internal/safe-string-coercion
276271
data.append(formFieldPrefix + streamId, partJSON);
277272
reader.read().then(progress, reject);
278273
} catch (x) {
@@ -326,7 +321,6 @@ export function processReply(
326321
) {
327322
if (entry.done) {
328323
if (entry.value === undefined) {
329-
// eslint-disable-next-line react-internal/safe-string-coercion
330324
data.append(formFieldPrefix + streamId, 'C'); // Close signal
331325
} else {
332326
// Unlike streams, the last value may not be undefined. If it's not
@@ -348,7 +342,6 @@ export function processReply(
348342
try {
349343
// $FlowFixMe[incompatible-type]: While plain JSON can return undefined we never do here.
350344
const partJSON: string = JSON.stringify(entry.value, resolveToJSON);
351-
// eslint-disable-next-line react-internal/safe-string-coercion
352345
data.append(formFieldPrefix + streamId, partJSON);
353346
iterator.next().then(progress, reject);
354347
} catch (x) {
@@ -441,7 +434,6 @@ export function processReply(
441434
const partJSON = serializeModel(resolvedModel, lazyId);
442435
// $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
443436
const data: FormData = formData;
444-
// eslint-disable-next-line react-internal/safe-string-coercion
445437
data.append(formFieldPrefix + lazyId, partJSON);
446438
return serializeByValueID(lazyId);
447439
} catch (x) {
@@ -461,7 +453,6 @@ export function processReply(
461453
const partJSON = serializeModel(value, lazyId);
462454
// $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
463455
const data: FormData = formData;
464-
// eslint-disable-next-line react-internal/safe-string-coercion
465456
data.append(formFieldPrefix + lazyId, partJSON);
466457
pendingParts--;
467458
if (pendingParts === 0) {
@@ -502,7 +493,6 @@ export function processReply(
502493
const partJSON = serializeModel(partValue, promiseId);
503494
// $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
504495
const data: FormData = formData;
505-
// eslint-disable-next-line react-internal/safe-string-coercion
506496
data.append(formFieldPrefix + promiseId, partJSON);
507497
pendingParts--;
508498
if (pendingParts === 0) {
@@ -784,7 +774,6 @@ export function processReply(
784774
}
785775
// The reference to this function came from the same client so we can pass it back.
786776
const refId = nextPartId++;
787-
// eslint-disable-next-line react-internal/safe-string-coercion
788777
formData.set(formFieldPrefix + refId, metaDataJSON);
789778
return serializeServerReferenceID(refId);
790779
}

packages/react-client/src/forks/ReactFlightClientConfig.custom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const usedWithSSR = true;
4242

4343
export opaque type Source = mixed;
4444

45-
export opaque type StringDecoder = mixed; // eslint-disable-line no-undef
45+
export opaque type StringDecoder = mixed;
4646

4747
export const createStringDecoder = $$$config.createStringDecoder;
4848
export const readPartialStringChunk = $$$config.readPartialStringChunk;

packages/react-devtools-extensions/flow-typed/jest.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,11 @@ type JestPromiseType = {
146146
* Use rejects to unwrap the reason of a rejected promise so any other
147147
* matcher can be chained. If the promise is fulfilled the assertion fails.
148148
*/
149-
// eslint-disable-next-line no-use-before-define
150149
rejects: JestExpectType,
151150
/**
152151
* Use resolves to unwrap the value of a fulfilled promise so any other
153152
* matcher can be chained. If the promise is rejected the assertion fails.
154153
*/
155-
// eslint-disable-next-line no-use-before-define
156154
resolves: JestExpectType,
157155
};
158156

@@ -1098,10 +1096,8 @@ type JestPrettyFormatColors = {
10981096
};
10991097

11001098
type JestPrettyFormatIndent = string => string;
1101-
// eslint-disable-next-line no-unused-vars
11021099
type JestPrettyFormatRefs = Array<any>;
11031100
type JestPrettyFormatPrint = any => string;
1104-
// eslint-disable-next-line no-unused-vars
11051101
type JestPrettyFormatStringOrNull = string | null;
11061102

11071103
type JestPrettyFormatOptions = {
@@ -1112,7 +1108,6 @@ type JestPrettyFormatOptions = {
11121108
indent: number,
11131109
maxDepth: number,
11141110
min: boolean,
1115-
// eslint-disable-next-line no-use-before-define
11161111
plugins: JestPrettyFormatPlugins,
11171112
printFunctionName: boolean,
11181113
spacing: string,

packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ type TestRendererOptions = {
5252
};
5353

5454
declare module 'react-test-renderer' {
55-
// eslint-disable-next-line no-inner-declarations
5655
declare export type ReactTestRenderer = {
5756
toJSON(): null | ReactTestRendererJSON,
5857
toTree(): null | ReactTestRendererTree,

packages/react-devtools-inline/__tests__/__e2e__/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const config = require('../../playwright.config');
77
const {test} = require('@playwright/test');
88

99
function runOnlyForReactRange(range) {
10-
// eslint-disable-next-line jest/no-disabled-tests
1110
test.skip(
1211
!semver.satisfies(config.use.react_version, range),
1312
`This test requires a React version of ${range} to run. ` +

packages/react-devtools-shared/src/__tests__/inspectedElement-test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ describe('InspectedElement', () => {
665665
anonymous_fn={instance.anonymousFunction}
666666
array_buffer={arrayBuffer}
667667
array_of_arrays={arrayOfArrays}
668-
// eslint-disable-next-line no-undef
669668
big_int={BigInt(123)}
670669
bound_fn={exampleFunction.bind(this)}
671670
data_view={dataView}
@@ -1876,7 +1875,7 @@ describe('InspectedElement', () => {
18761875
xyz: 1,
18771876
},
18781877
});
1879-
const bigInt = BigInt(123); // eslint-disable-line no-undef
1878+
const bigInt = BigInt(123);
18801879

18811880
await utils.actAsync(() =>
18821881
render(

packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ describe('InspectedElementContext', () => {
185185
anonymous_fn: instance.anonymousFunction,
186186
array_buffer: arrayBuffer,
187187
array_of_arrays: arrayOfArrays,
188-
// eslint-disable-next-line no-undef
189188
big_int: BigInt(123),
190189
bound_fn: exampleFunction.bind(this),
191190
data_view: dataView,
@@ -888,7 +887,7 @@ describe('InspectedElementContext', () => {
888887
xyz: 1,
889888
},
890889
});
891-
const bigInt = BigInt(123); // eslint-disable-line no-undef
890+
const bigInt = BigInt(123);
892891

893892
act(() =>
894893
ReactDOM.render(

packages/react-devtools-shared/src/backend/DevToolsConsolePatching.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ disabledLog.__reactDisabledLog = true;
3030

3131
export function disableLogs(): void {
3232
if (disabledDepth === 0) {
33-
/* eslint-disable react-internal/no-production-logging */
3433
prevLog = console.log;
3534
prevInfo = console.info;
3635
prevWarn = console.warn;
@@ -63,7 +62,6 @@ export function disableLogs(): void {
6362
export function reenableLogs(): void {
6463
disabledDepth--;
6564
if (disabledDepth === 0) {
66-
/* eslint-disable react-internal/no-production-logging */
6765
const props = {
6866
configurable: true,
6967
enumerable: true,

0 commit comments

Comments
 (0)