Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Commit

Permalink
Eslint config: migrate to the new 'flowtype/use-read-only-spread' rule
Browse files Browse the repository at this point in the history
This change finishes a migration from our custom `adeira/flow-use-readonly-spread` rule to the official `flowtype/use-read-only-spread` rule. The behavior should stay unchanged since the underlying code is basically identical. See: gajus/eslint-plugin-flowtype#472

adeira-source-id: bf37c3e6bc3e80b54d97f1c9ac3157139fe76243
  • Loading branch information
mrtnzlml authored and adeira-github-bot committed Apr 6, 2021
1 parent 3b60c5f commit f39418e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ResponseError.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import setPrototypeOf from './setPrototypeOf';

type ResponseErrorType = {
type ResponseErrorType = $ReadOnly<{
...Error,
+response: Response,
...
};
}>;

/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types
Expand Down
4 changes: 2 additions & 2 deletions src/fetchWithRetries.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import fetch from './fetch';
import TimeoutError from './TimeoutError';
import ResponseError from './ResponseError';

type InitWithRetries = {|
type InitWithRetries = $ReadOnly<{|
...$Exact<RequestOptions>,
+fetchTimeout?: number,
+retryDelays?: $ReadOnlyArray<number>,
|};
|}>;

const DEFAULT_TIMEOUT = 15000;
const DEFAULT_RETRIES = [1000, 3000];
Expand Down

0 comments on commit f39418e

Please sign in to comment.