mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-25 08:09:06 -04:00
add eslint rules for semi colons (#3989)
* add rules for semi colons * run lint fix * remove invalid eslint disable
This commit is contained in:
1 parent
c7f07fd63e
commit
7ffc391428
127 files changed
+446
-445
No files matched your search
+3
-1
@@ -92,7 +92,7 @@ module.exports = {
|
||||
'no-multiple-empty-lines': [ERROR, { 'max': 1, 'maxEOF': 0 }],
|
||||
'object-curly-spacing': [ERROR, 'always'],
|
||||
'quotes': OFF(UNKNOWN),
|
||||
'semi': [ERROR, 'always'],
|
||||
'semi': SUCCESSOR(TYPESCRIPT_EXTENSION),
|
||||
'space-before-function-paren': [ERROR, { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
|
||||
'space-infix-ops': SUCCESSOR(TYPESCRIPT_EXTENSION),
|
||||
'space-unary-ops': ERROR,
|
||||
@@ -139,12 +139,14 @@ module.exports = {
|
||||
'@typescript-eslint/consistent-type-definitions': [ERROR, 'interface'],
|
||||
'@typescript-eslint/explicit-module-boundary-types': OFF(UNKNOWN),
|
||||
'@typescript-eslint/keyword-spacing': ERROR,
|
||||
'@typescript-eslint/member-delimiter-style': ERROR,
|
||||
'@typescript-eslint/no-empty-function': OFF(UNKNOWN),
|
||||
'@typescript-eslint/no-namespace': [ERROR, { allowDeclarations: true }],
|
||||
'@typescript-eslint/no-redeclare': ERROR,
|
||||
'@typescript-eslint/no-unused-vars': [ERROR, { ignoreRestSiblings: true }],
|
||||
'@typescript-eslint/no-use-before-define': ERROR,
|
||||
'@typescript-eslint/space-infix-ops': ERROR,
|
||||
'@typescript-eslint/semi': [ERROR, 'always'],
|
||||
'@typescript-eslint/quotes': [ERROR, 'single', { avoidEscape: true }],
|
||||
|
||||
'simple-import-sort/imports': ERROR,
|
||||
|
||||
@@ -19,7 +19,7 @@ class Curl extends EventEmitter {
|
||||
EFFECTIVE_URL: 'EFFECTIVE_URL',
|
||||
SIZE_DOWNLOAD: 'SIZE_DOWNLOAD',
|
||||
TOTAL_TIME: 'TOTAL_TIME',
|
||||
}
|
||||
};
|
||||
|
||||
static option = {
|
||||
ACCEPT_ENCODING: 'ACCEPT_ENCODING',
|
||||
@@ -62,7 +62,7 @@ class Curl extends EventEmitter {
|
||||
VERBOSE: 'VERBOSE',
|
||||
WRITEFUNCTION: 'WRITEFUNCTION',
|
||||
XFERINFOFUNCTION: 'XFERINFOFUNCTION',
|
||||
}
|
||||
};
|
||||
|
||||
static getVersion() {
|
||||
return 'libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0';
|
||||
|
||||
@@ -332,7 +332,7 @@ export type DashboardSortOrder =
|
||||
| 'name-desc'
|
||||
| 'created-asc'
|
||||
| 'created-desc'
|
||||
| 'modified-desc'
|
||||
| 'modified-desc';
|
||||
|
||||
export const DASHBOARD_SORT_ORDERS = [
|
||||
SORT_MODIFIED_DESC,
|
||||
|
||||
@@ -46,7 +46,7 @@ export interface RenderContextAndKeys {
|
||||
keys: {
|
||||
name: string;
|
||||
value: any;
|
||||
}[]
|
||||
}[];
|
||||
}
|
||||
|
||||
export type HandleGetRenderContext = () => Promise<RenderContextAndKeys>;
|
||||
|
||||
@@ -220,7 +220,7 @@ export function getBodyStream<T extends Response, TFail extends Readable>(
|
||||
}
|
||||
|
||||
export const getBodyBuffer = <TFail = null>(
|
||||
response?: { bodyPath?: string, bodyCompression?: Compression },
|
||||
response?: { bodyPath?: string; bodyCompression?: Compression },
|
||||
readFailureValue?: TFail | null,
|
||||
) => getBodyBufferFromPath(
|
||||
response?.bodyPath || '',
|
||||
|
||||
@@ -2,7 +2,7 @@ import { MethodDefinition } from '@grpc/grpc-js';
|
||||
import { ValueOf } from 'type-fest';
|
||||
|
||||
// TODO(TSCONVERSION) remove this alias and type MethodDefinition correctly
|
||||
export type GrpcMethodDefinition = MethodDefinition<any, any>
|
||||
export type GrpcMethodDefinition = MethodDefinition<any, any>;
|
||||
|
||||
export const GrpcMethodTypeEnum = {
|
||||
unary: 'unary',
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { RequestBodyParameter } from '../models/request';
|
||||
export const DEFAULT_BOUNDARY = 'X-INSOMNIA-BOUNDARY';
|
||||
|
||||
interface Multipart {
|
||||
boundary: typeof DEFAULT_BOUNDARY,
|
||||
boundary: typeof DEFAULT_BOUNDARY;
|
||||
filePath: string;
|
||||
contentLength: number;
|
||||
}
|
||||
|
||||
@@ -16,15 +16,15 @@ import { showError } from '../ui/components/modals/index';
|
||||
import type { PluginTheme } from './misc';
|
||||
|
||||
export interface Module {
|
||||
templateTags?: PluginTemplateTag[],
|
||||
requestHooks?: ((requstContext: any) => void)[],
|
||||
responseHooks?: ((responseContext: any) => void)[],
|
||||
themes?: PluginTheme[],
|
||||
requestGroupActions?: OmitInternal<RequestGroupAction>[],
|
||||
requestActions?: OmitInternal<RequestAction>[],
|
||||
workspaceActions?: OmitInternal<WorkspaceAction>[],
|
||||
documentActions?: OmitInternal<DocumentAction>[],
|
||||
configGenerators?: OmitInternal<ConfigGenerator>[],
|
||||
templateTags?: PluginTemplateTag[];
|
||||
requestHooks?: ((requstContext: any) => void)[];
|
||||
responseHooks?: ((responseContext: any) => void)[];
|
||||
themes?: PluginTheme[];
|
||||
requestGroupActions?: OmitInternal<RequestGroupAction>[];
|
||||
requestActions?: OmitInternal<RequestAction>[];
|
||||
workspaceActions?: OmitInternal<WorkspaceAction>[];
|
||||
documentActions?: OmitInternal<DocumentAction>[];
|
||||
configGenerators?: OmitInternal<ConfigGenerator>[];
|
||||
}
|
||||
|
||||
export interface Plugin {
|
||||
|
||||
@@ -17,7 +17,7 @@ interface InsomniaPlugin {
|
||||
dist: {
|
||||
shasum: string;
|
||||
tarball: string;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default async function(lookupName: string) {
|
||||
|
||||
@@ -114,7 +114,7 @@ export class MemClient {
|
||||
async writeFile(
|
||||
filePath: string,
|
||||
data: Buffer | string,
|
||||
options: BufferEncoding | { encoding?: BufferEncoding, flag?: string; } = {},
|
||||
options: BufferEncoding | { encoding?: BufferEncoding; flag?: string } = {},
|
||||
) {
|
||||
filePath = path.normalize(filePath);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const DELETE_KEY: keyof BaseModel = 'modified';
|
||||
|
||||
type ResetModelKeys<T extends BaseModel> = {
|
||||
[K in keyof T]?: T[K] | null;
|
||||
}
|
||||
};
|
||||
|
||||
// Keys for VCS to reset before computing changes
|
||||
// We can't always delete keys
|
||||
|
||||
@@ -8,7 +8,7 @@ import { VCS } from './vcs';
|
||||
|
||||
const blankStage = {};
|
||||
|
||||
export const initializeLocalBackendProjectAndMarkForSync = async ({ vcs, workspace }: { vcs: VCS; workspace: Workspace; }) => {
|
||||
export const initializeLocalBackendProjectAndMarkForSync = async ({ vcs, workspace }: { vcs: VCS; workspace: Workspace }) => {
|
||||
if (!isCollection(workspace)) {
|
||||
// Don't initialize and mark for sync unless we're in a collection
|
||||
return;
|
||||
|
||||
@@ -561,7 +561,7 @@ export const interceptAccessError = async <T>(
|
||||
resourceName,
|
||||
resourceType = strings.collection.singular.toLowerCase(),
|
||||
}: {
|
||||
callback: () => T | Promise<T>,
|
||||
callback: () => T | Promise<T>;
|
||||
action: string;
|
||||
resourceName: string;
|
||||
resourceType?: string;
|
||||
|
||||
@@ -1230,7 +1230,7 @@ export class VCS {
|
||||
const symmetricKey = await crypt.generateAES256Key();
|
||||
const symmetricKeyStr = JSON.stringify(symmetricKey);
|
||||
|
||||
const teamKeys: {accountId: string, encSymmetricKey: string}[] = [];
|
||||
const teamKeys: {accountId: string; encSymmetricKey: string}[] = [];
|
||||
let encSymmetricKey: string | undefined;
|
||||
|
||||
if (teamId) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { Workspace } from '../../models/workspace';
|
||||
|
||||
interface Props {
|
||||
activity: GlobalActivity;
|
||||
handleActivityChange: (options: {workspaceId?: string, nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleActivityChange: (options: {workspaceId?: string; nextActivity: GlobalActivity}) => Promise<void>;
|
||||
workspace: Workspace;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ import React, { ButtonHTMLAttributes, CSSProperties, PureComponent, ReactNode }
|
||||
import { AUTOBIND_CFG } from '../../../common/constants';
|
||||
|
||||
export interface ButtonProps<T> {
|
||||
children: ReactNode,
|
||||
value?: T,
|
||||
className?: string,
|
||||
onDisabledClick?: React.MouseEventHandler<HTMLButtonElement> | ((value: T | undefined, e: React.MouseEvent<HTMLButtonElement>) => void),
|
||||
onClick?: React.MouseEventHandler<HTMLButtonElement> | ((value: T | undefined, e: React.MouseEvent<HTMLButtonElement>) => void),
|
||||
disabled?: boolean,
|
||||
tabIndex?: number,
|
||||
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'],
|
||||
id?: string,
|
||||
children: ReactNode;
|
||||
value?: T;
|
||||
className?: string;
|
||||
onDisabledClick?: React.MouseEventHandler<HTMLButtonElement> | ((value: T | undefined, e: React.MouseEvent<HTMLButtonElement>) => void);
|
||||
onClick?: React.MouseEventHandler<HTMLButtonElement> | ((value: T | undefined, e: React.MouseEvent<HTMLButtonElement>) => void);
|
||||
disabled?: boolean;
|
||||
tabIndex?: number;
|
||||
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
||||
id?: string;
|
||||
// TODO(TSCONVERSION) figure out why so many components pass this yet it isn't used
|
||||
title?: string;
|
||||
style?: CSSProperties;
|
||||
|
||||
@@ -6,10 +6,10 @@ import React, { PureComponent, ReactNode } from 'react';
|
||||
import { AUTOBIND_CFG } from '../../../common/constants';
|
||||
|
||||
interface Props extends ButtonProps {
|
||||
content: string | Function,
|
||||
children?: ReactNode,
|
||||
title?: string,
|
||||
confirmMessage?: string,
|
||||
content: string | Function;
|
||||
children?: ReactNode;
|
||||
title?: string;
|
||||
confirmMessage?: string;
|
||||
}
|
||||
|
||||
interface State {
|
||||
@@ -20,7 +20,7 @@ interface State {
|
||||
class CopyButton extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
showConfirmation: false,
|
||||
}
|
||||
};
|
||||
|
||||
_triggerTimeout: NodeJS.Timeout | null = null;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { ButtonHTMLAttributes, PureComponent, ReactNode } from 'react';
|
||||
|
||||
interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
children: ReactNode,
|
||||
noWrap?: boolean,
|
||||
className?: string,
|
||||
children: ReactNode;
|
||||
noWrap?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
class DropdownButton extends PureComponent<Props> {
|
||||
|
||||
@@ -2,7 +2,7 @@ import classnames from 'classnames';
|
||||
import React, { PureComponent, ReactNode } from 'react';
|
||||
|
||||
interface Props {
|
||||
children?: ReactNode,
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
class DropdownDivider extends PureComponent<Props> {
|
||||
|
||||
@@ -6,15 +6,15 @@ import { AUTOBIND_CFG } from '../../../../common/constants';
|
||||
|
||||
interface Props {
|
||||
addIcon?: boolean; // TODO(TSCONVERSION) some consumers are passing this prop but it appears to be unused
|
||||
title?: string,
|
||||
buttonClass?: React.ComponentType,
|
||||
stayOpenAfterClick?: boolean,
|
||||
value?: any,
|
||||
disabled?: boolean,
|
||||
onClick: Function,
|
||||
children: ReactNode,
|
||||
className?: string,
|
||||
color?: string,
|
||||
title?: string;
|
||||
buttonClass?: React.ComponentType;
|
||||
stayOpenAfterClick?: boolean;
|
||||
value?: any;
|
||||
disabled?: boolean;
|
||||
onClick: Function;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
|
||||
@@ -2,8 +2,8 @@ import classnames from 'classnames';
|
||||
import React, { PureComponent, ReactNode } from 'react';
|
||||
|
||||
interface Props {
|
||||
children: ReactNode,
|
||||
className?: string,
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
class DropdownRight extends PureComponent<Props> {
|
||||
|
||||
@@ -14,26 +14,26 @@ import DropdownItem from './dropdown-item';
|
||||
const dropdownsContainer = document.querySelector('#dropdowns-container');
|
||||
|
||||
export interface DropdownProps {
|
||||
children: ReactNode,
|
||||
right?: boolean,
|
||||
outline?: boolean,
|
||||
wide?: boolean,
|
||||
onOpen?: Function,
|
||||
onHide?: Function,
|
||||
className?: string,
|
||||
style?: CSSProperties,
|
||||
beside?: boolean,
|
||||
children: ReactNode;
|
||||
right?: boolean;
|
||||
outline?: boolean;
|
||||
wide?: boolean;
|
||||
onOpen?: Function;
|
||||
onHide?: Function;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
beside?: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
open: boolean,
|
||||
dropUp: boolean,
|
||||
filter: string,
|
||||
filterVisible: boolean,
|
||||
filterItems?: number[] | null,
|
||||
filterActiveIndex: number,
|
||||
forcedPosition?: {x: number, y: number} | null,
|
||||
uniquenessKey: number,
|
||||
open: boolean;
|
||||
dropUp: boolean;
|
||||
filter: string;
|
||||
filterVisible: boolean;
|
||||
filterItems?: number[] | null;
|
||||
filterActiveIndex: number;
|
||||
forcedPosition?: {x: number; y: number} | null;
|
||||
uniquenessKey: number;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
@@ -54,7 +54,7 @@ class Dropdown extends PureComponent<DropdownProps, State> {
|
||||
forcedPosition: null,
|
||||
// Use this to force new menu every time dropdown opens
|
||||
uniquenessKey: 0,
|
||||
}
|
||||
};
|
||||
|
||||
_setRef(n: HTMLDivElement) {
|
||||
this._node = n;
|
||||
|
||||
@@ -20,15 +20,15 @@ export const shouldSave = (oldValue, newValue, preventBlank = false) => {
|
||||
};
|
||||
|
||||
interface Props {
|
||||
onSubmit: (value?: string) => void,
|
||||
value: string,
|
||||
fallbackValue?: string,
|
||||
blankValue?: string,
|
||||
renderReadView?: Function,
|
||||
singleClick?: boolean,
|
||||
onEditStart?: Function,
|
||||
className?: string,
|
||||
preventBlank?: boolean,
|
||||
onSubmit: (value?: string) => void;
|
||||
value: string;
|
||||
fallbackValue?: string;
|
||||
blankValue?: string;
|
||||
renderReadView?: Function;
|
||||
singleClick?: boolean;
|
||||
onEditStart?: Function;
|
||||
className?: string;
|
||||
preventBlank?: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
@@ -39,7 +39,7 @@ interface State {
|
||||
class Editable extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
editing: false,
|
||||
}
|
||||
};
|
||||
|
||||
_input: HTMLInputElement | null = null;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ interface State {
|
||||
class Lazy extends PureComponent<Props> {
|
||||
state: State = {
|
||||
show: false,
|
||||
}
|
||||
};
|
||||
|
||||
show() {
|
||||
this.setState({
|
||||
|
||||
@@ -11,19 +11,19 @@ import KeydownBinder from '../keydown-binder';
|
||||
let globalZIndex = 1000;
|
||||
|
||||
export interface ModalProps {
|
||||
tall?: boolean,
|
||||
wide?: boolean,
|
||||
skinny?: boolean,
|
||||
noEscape?: boolean,
|
||||
dontFocus?: boolean,
|
||||
closeOnKeyCodes?: any[],
|
||||
onShow?: Function,
|
||||
onHide?: Function,
|
||||
onCancel?: Function,
|
||||
onKeyDown?: Function,
|
||||
freshState?: boolean,
|
||||
children?: ReactNode,
|
||||
className?: string,
|
||||
tall?: boolean;
|
||||
wide?: boolean;
|
||||
skinny?: boolean;
|
||||
noEscape?: boolean;
|
||||
dontFocus?: boolean;
|
||||
closeOnKeyCodes?: any[];
|
||||
onShow?: Function;
|
||||
onHide?: Function;
|
||||
onCancel?: Function;
|
||||
onKeyDown?: Function;
|
||||
freshState?: boolean;
|
||||
children?: ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -28,7 +28,7 @@ interface Props {
|
||||
}
|
||||
|
||||
interface State {
|
||||
state: States
|
||||
state: States;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
@@ -37,7 +37,7 @@ class PromptButton extends PureComponent<Props> {
|
||||
_triggerTimeout: NodeJS.Timeout | null = null;
|
||||
state: State = {
|
||||
state: STATE_DEFAULT,
|
||||
}
|
||||
};
|
||||
|
||||
_confirm(...args) {
|
||||
if (this._triggerTimeout !== null) {
|
||||
|
||||
@@ -21,7 +21,7 @@ class CheckForUpdatesButton extends PureComponent<Props, State> {
|
||||
status: '',
|
||||
checking: false,
|
||||
updateAvailable: false,
|
||||
}
|
||||
};
|
||||
|
||||
_listenerCheckComplete(_e, updateAvailable: true, status: string) {
|
||||
this.setState({
|
||||
|
||||
@@ -86,63 +86,63 @@ const BASE_CODEMIRROR_OPTIONS: CodeMirror.EditorConfiguration = {
|
||||
export type CodeEditorOnChange = (value: string) => void;
|
||||
|
||||
interface Props {
|
||||
indentWithTabs?: boolean,
|
||||
onChange?: CodeEditorOnChange,
|
||||
onCursorActivity?: Function,
|
||||
onFocus?: Function,
|
||||
onBlur?: Function,
|
||||
onClickLink?: CodeMirrorLinkClickCallback,
|
||||
onKeyDown?: Function,
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>,
|
||||
onClick?: React.MouseEventHandler<HTMLDivElement>,
|
||||
onPaste?: Function,
|
||||
onCodeMirrorInit?: (editor: CodeMirror.EditorFromTextArea) => void,
|
||||
render?: HandleRender,
|
||||
nunjucksPowerUserMode?: boolean,
|
||||
getRenderContext?: HandleGetRenderContext,
|
||||
getAutocompleteConstants?: Function,
|
||||
getAutocompleteSnippets?: Function,
|
||||
keyMap?: string,
|
||||
mode?: string,
|
||||
id?: string,
|
||||
placeholder?: string,
|
||||
lineWrapping?: boolean,
|
||||
hideLineNumbers?: boolean,
|
||||
hideGutters?: boolean,
|
||||
noMatchBrackets?: boolean,
|
||||
hideScrollbars?: boolean,
|
||||
fontSize?: number,
|
||||
indentSize?: number,
|
||||
defaultValue?: string,
|
||||
tabIndex?: number,
|
||||
autoPrettify?: boolean,
|
||||
manualPrettify?: boolean,
|
||||
noLint?: boolean,
|
||||
noDragDrop?: boolean,
|
||||
noStyleActiveLine?: boolean,
|
||||
className?: string,
|
||||
style?: Object,
|
||||
updateFilter?: (filter: string) => void,
|
||||
defaultTabBehavior?: boolean,
|
||||
readOnly?: boolean,
|
||||
type?: string,
|
||||
filter?: string,
|
||||
filterHistory?: string[],
|
||||
singleLine?: boolean,
|
||||
debounceMillis?: number,
|
||||
dynamicHeight?: boolean,
|
||||
autoCloseBrackets?: boolean,
|
||||
hintOptions?: Object,
|
||||
lintOptions?: Object,
|
||||
infoOptions?: Object,
|
||||
jumpOptions?: Object,
|
||||
uniquenessKey?: string,
|
||||
isVariableUncovered?: boolean,
|
||||
raw?: boolean,
|
||||
indentWithTabs?: boolean;
|
||||
onChange?: CodeEditorOnChange;
|
||||
onCursorActivity?: Function;
|
||||
onFocus?: Function;
|
||||
onBlur?: Function;
|
||||
onClickLink?: CodeMirrorLinkClickCallback;
|
||||
onKeyDown?: Function;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
||||
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
||||
onPaste?: Function;
|
||||
onCodeMirrorInit?: (editor: CodeMirror.EditorFromTextArea) => void;
|
||||
render?: HandleRender;
|
||||
nunjucksPowerUserMode?: boolean;
|
||||
getRenderContext?: HandleGetRenderContext;
|
||||
getAutocompleteConstants?: Function;
|
||||
getAutocompleteSnippets?: Function;
|
||||
keyMap?: string;
|
||||
mode?: string;
|
||||
id?: string;
|
||||
placeholder?: string;
|
||||
lineWrapping?: boolean;
|
||||
hideLineNumbers?: boolean;
|
||||
hideGutters?: boolean;
|
||||
noMatchBrackets?: boolean;
|
||||
hideScrollbars?: boolean;
|
||||
fontSize?: number;
|
||||
indentSize?: number;
|
||||
defaultValue?: string;
|
||||
tabIndex?: number;
|
||||
autoPrettify?: boolean;
|
||||
manualPrettify?: boolean;
|
||||
noLint?: boolean;
|
||||
noDragDrop?: boolean;
|
||||
noStyleActiveLine?: boolean;
|
||||
className?: string;
|
||||
style?: Object;
|
||||
updateFilter?: (filter: string) => void;
|
||||
defaultTabBehavior?: boolean;
|
||||
readOnly?: boolean;
|
||||
type?: string;
|
||||
filter?: string;
|
||||
filterHistory?: string[];
|
||||
singleLine?: boolean;
|
||||
debounceMillis?: number;
|
||||
dynamicHeight?: boolean;
|
||||
autoCloseBrackets?: boolean;
|
||||
hintOptions?: Object;
|
||||
lintOptions?: Object;
|
||||
infoOptions?: Object;
|
||||
jumpOptions?: Object;
|
||||
uniquenessKey?: string;
|
||||
isVariableUncovered?: boolean;
|
||||
raw?: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
filter: string
|
||||
filter: string;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
|
||||
@@ -61,7 +61,7 @@ class GitSyncDropdown extends PureComponent<Props, State> {
|
||||
log: [],
|
||||
branch: '',
|
||||
branches: [],
|
||||
}
|
||||
};
|
||||
|
||||
_setDropdownRef(n: Dropdown) {
|
||||
this._dropdown = n;
|
||||
|
||||
@@ -10,11 +10,11 @@ const LOCALSTORAGE_KEY = 'insomnia.httpMethods';
|
||||
const GRPC_LABEL = 'gRPC';
|
||||
|
||||
interface Props {
|
||||
onChange: Function,
|
||||
method: string,
|
||||
right?: boolean,
|
||||
showGrpc?: boolean,
|
||||
className?: string,
|
||||
onChange: Function;
|
||||
method: string;
|
||||
right?: boolean;
|
||||
showGrpc?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
|
||||
@@ -32,7 +32,7 @@ const StyledTooltip = styled(Tooltip)({
|
||||
...tooltipIconPlacementHack,
|
||||
});
|
||||
|
||||
const TooltipIcon = ({ message, icon }: { message: string, icon: SvgIconProps['icon'] }) => (
|
||||
const TooltipIcon = ({ message, icon }: { message: string; icon: SvgIconProps['icon'] }) => (
|
||||
<StyledTooltip message={message}>
|
||||
<StyledSvgIcon icon={icon} />
|
||||
</StyledTooltip>
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Props {
|
||||
vcs?: VCS | null;
|
||||
}
|
||||
|
||||
const PullButton: FC<{disabled?: boolean, className?: string}> = ({ disabled, className }) => (
|
||||
const PullButton: FC<{disabled?: boolean; className?: string}> = ({ disabled, className }) => (
|
||||
<Button className={className} disabled={disabled}>
|
||||
Pull
|
||||
<i className="fa fa-caret-down pad-left-sm" />
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ interface Props extends ReduxProps, Partial<DropdownProps> {
|
||||
hotKeyRegistry: HotKeyRegistry;
|
||||
handleCreateRequest: (id: string) => any;
|
||||
handleDuplicateRequestGroup: (requestGroup: RequestGroup) => any;
|
||||
handleShowSettings: (requestGroup: RequestGroup) => any,
|
||||
handleShowSettings: (requestGroup: RequestGroup) => any;
|
||||
handleCreateRequestGroup: (requestGroup: string) => any;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class UnconnectedSyncDropdown extends PureComponent<Props, State> {
|
||||
unstaged: {},
|
||||
},
|
||||
remoteBackendProjects: [],
|
||||
}
|
||||
};
|
||||
|
||||
async refreshMainAttributes(extraState: Partial<State> = {}) {
|
||||
const { vcs, syncItems, workspace, project } = this.props;
|
||||
|
||||
@@ -31,7 +31,7 @@ import OAuth2Auth from './o-auth-2-auth';
|
||||
|
||||
interface Props {
|
||||
handleRender: HandleRender;
|
||||
handleGetRenderContext: HandleGetRenderContext
|
||||
handleGetRenderContext: HandleGetRenderContext;
|
||||
handleUpdateSettingsShowPasswords: (showPasswords: boolean) => Promise<Settings>;
|
||||
nunjucksPowerUserMode: boolean;
|
||||
onChange: (arg0: Request, arg1: RequestAuthentication) => Promise<Request>;
|
||||
|
||||
@@ -63,7 +63,7 @@ class OAuth2Auth extends PureComponent<Props, State> {
|
||||
error: '',
|
||||
loading: false,
|
||||
showAdvanced, // Remember from last time
|
||||
}
|
||||
};
|
||||
|
||||
_handleToggleAdvanced() {
|
||||
// Remember this for the entirety of the session
|
||||
|
||||
@@ -6,12 +6,12 @@ import { HandleGetRenderContext, HandleRender } from '../../../../common/render'
|
||||
import KeyValueEditor from '../../key-value-editor/editor';
|
||||
|
||||
interface Props {
|
||||
onChange: Function,
|
||||
parameters: any[],
|
||||
nunjucksPowerUserMode: boolean,
|
||||
isVariableUncovered: boolean,
|
||||
handleRender?: HandleRender,
|
||||
handleGetRenderContext?: HandleGetRenderContext,
|
||||
onChange: Function;
|
||||
parameters: any[];
|
||||
nunjucksPowerUserMode: boolean;
|
||||
isVariableUncovered: boolean;
|
||||
handleRender?: HandleRender;
|
||||
handleGetRenderContext?: HandleGetRenderContext;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
|
||||
@@ -50,7 +50,7 @@ class EnvironmentEditor extends PureComponent<Props, State> {
|
||||
|
||||
state: State = {
|
||||
error: null,
|
||||
}
|
||||
};
|
||||
|
||||
_handleChange() {
|
||||
let error: string | null = null;
|
||||
|
||||
@@ -26,7 +26,7 @@ interface State {
|
||||
class PasswordEditor extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
showPassword: false,
|
||||
}
|
||||
};
|
||||
|
||||
_handleShowPassword() {
|
||||
this.setState({
|
||||
|
||||
@@ -23,7 +23,7 @@ class SingleErrorBoundary extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
error: null,
|
||||
info: null,
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
UNSAFE_componentWillReceiveProps(nextProps: Props) {
|
||||
|
||||
@@ -17,53 +17,53 @@ import CodePromptModal from '../modals/code-prompt-modal';
|
||||
import { showModal } from '../modals/index';
|
||||
|
||||
interface Props {
|
||||
onChange: Function,
|
||||
onDelete: Function,
|
||||
onFocusName: Function,
|
||||
onFocusValue: Function,
|
||||
onFocusDescription: Function,
|
||||
displayDescription: boolean,
|
||||
index: number,
|
||||
onChange: Function;
|
||||
onDelete: Function;
|
||||
onFocusName: Function;
|
||||
onFocusValue: Function;
|
||||
onFocusDescription: Function;
|
||||
displayDescription: boolean;
|
||||
index: number;
|
||||
pair: {
|
||||
id: string,
|
||||
name: string,
|
||||
value: string,
|
||||
description: string,
|
||||
fileName: string,
|
||||
type: string,
|
||||
disabled: boolean,
|
||||
},
|
||||
readOnly?: boolean,
|
||||
onMove?: Function,
|
||||
onKeyDown?: Function,
|
||||
onBlurName?: Function,
|
||||
onBlurValue?: Function,
|
||||
onBlurDescription?: Function,
|
||||
handleRender?: HandleRender,
|
||||
handleGetRenderContext?: HandleGetRenderContext,
|
||||
nunjucksPowerUserMode?: boolean,
|
||||
isVariableUncovered?: boolean,
|
||||
handleGetAutocompleteNameConstants?: Function,
|
||||
handleGetAutocompleteValueConstants?: Function,
|
||||
namePlaceholder?: string,
|
||||
valuePlaceholder?: string,
|
||||
descriptionPlaceholder?: string,
|
||||
valueInputType?: string,
|
||||
forceInput?: boolean,
|
||||
allowMultiline?: boolean,
|
||||
allowFile?: boolean,
|
||||
sortable?: boolean,
|
||||
noDelete?: boolean,
|
||||
noDropZone?: boolean,
|
||||
hideButtons?: boolean,
|
||||
className?: string,
|
||||
renderLeftIcon?: Function,
|
||||
id: string;
|
||||
name: string;
|
||||
value: string;
|
||||
description: string;
|
||||
fileName: string;
|
||||
type: string;
|
||||
disabled: boolean;
|
||||
};
|
||||
readOnly?: boolean;
|
||||
onMove?: Function;
|
||||
onKeyDown?: Function;
|
||||
onBlurName?: Function;
|
||||
onBlurValue?: Function;
|
||||
onBlurDescription?: Function;
|
||||
handleRender?: HandleRender;
|
||||
handleGetRenderContext?: HandleGetRenderContext;
|
||||
nunjucksPowerUserMode?: boolean;
|
||||
isVariableUncovered?: boolean;
|
||||
handleGetAutocompleteNameConstants?: Function;
|
||||
handleGetAutocompleteValueConstants?: Function;
|
||||
namePlaceholder?: string;
|
||||
valuePlaceholder?: string;
|
||||
descriptionPlaceholder?: string;
|
||||
valueInputType?: string;
|
||||
forceInput?: boolean;
|
||||
allowMultiline?: boolean;
|
||||
allowFile?: boolean;
|
||||
sortable?: boolean;
|
||||
noDelete?: boolean;
|
||||
noDropZone?: boolean;
|
||||
hideButtons?: boolean;
|
||||
className?: string;
|
||||
renderLeftIcon?: Function;
|
||||
// For drag-n-drop
|
||||
connectDragSource?: ConnectDragSource,
|
||||
connectDragPreview?: ConnectDragPreview,
|
||||
connectDropTarget?: ConnectDropTarget,
|
||||
isDragging?: boolean,
|
||||
isDraggingOver?: boolean,
|
||||
connectDragSource?: ConnectDragSource;
|
||||
connectDragPreview?: ConnectDragPreview;
|
||||
connectDropTarget?: ConnectDropTarget;
|
||||
isDragging?: boolean;
|
||||
isDraggingOver?: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -10,21 +10,21 @@ import CodeEditor from './codemirror/code-editor';
|
||||
import MarkdownPreview from './markdown-preview';
|
||||
|
||||
interface Props {
|
||||
onChange: Function,
|
||||
defaultValue: string,
|
||||
fontSize: number,
|
||||
indentSize: number,
|
||||
keyMap: string,
|
||||
lineWrapping: boolean,
|
||||
handleRender: HandleRender,
|
||||
handleGetRenderContext: HandleGetRenderContext,
|
||||
nunjucksPowerUserMode: boolean,
|
||||
isVariableUncovered: boolean,
|
||||
placeholder?: string,
|
||||
defaultPreviewMode?: boolean,
|
||||
className?: string,
|
||||
mode?: string,
|
||||
tall?: boolean,
|
||||
onChange: Function;
|
||||
defaultValue: string;
|
||||
fontSize: number;
|
||||
indentSize: number;
|
||||
keyMap: string;
|
||||
lineWrapping: boolean;
|
||||
handleRender: HandleRender;
|
||||
handleGetRenderContext: HandleGetRenderContext;
|
||||
nunjucksPowerUserMode: boolean;
|
||||
isVariableUncovered: boolean;
|
||||
placeholder?: string;
|
||||
defaultPreviewMode?: boolean;
|
||||
className?: string;
|
||||
mode?: string;
|
||||
tall?: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -10,11 +10,11 @@ import { markdownToHTML } from '../../common/markdown-to-html';
|
||||
import { HandleRender } from '../../common/render';
|
||||
|
||||
interface Props {
|
||||
markdown: string,
|
||||
handleRender?: HandleRender,
|
||||
className?: string,
|
||||
debounceMillis?: number,
|
||||
heading?: string,
|
||||
markdown: string;
|
||||
handleRender?: HandleRender;
|
||||
className?: string;
|
||||
debounceMillis?: number;
|
||||
heading?: string;
|
||||
}
|
||||
|
||||
interface State {
|
||||
@@ -27,7 +27,7 @@ class MarkdownPreview extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
compiled: '',
|
||||
renderError: '',
|
||||
}
|
||||
};
|
||||
|
||||
_compileTimeout: NodeJS.Timeout | null = null;
|
||||
_preview: HTMLDivElement | null = null;
|
||||
|
||||
@@ -27,7 +27,7 @@ class AddKeyCombinationModal extends PureComponent<{}, State> {
|
||||
checkKeyCombinationDuplicate: misc.nullFn,
|
||||
onAddKeyCombination: misc.nullFn,
|
||||
pressedKeyCombination: null,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(modal: Modal) {
|
||||
this._modal = modal;
|
||||
|
||||
@@ -24,7 +24,7 @@ class AlertModal extends PureComponent<{}, State> {
|
||||
message: '',
|
||||
addCancel: false,
|
||||
okLabel: '',
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
_cancel: HTMLButtonElement | null = null;
|
||||
|
||||
@@ -31,7 +31,7 @@ class AskModal extends PureComponent<{}, State> {
|
||||
yesText: 'Yes',
|
||||
noText: 'No',
|
||||
loading: false,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
yesButton: HTMLButtonElement | null = null;
|
||||
|
||||
@@ -42,9 +42,9 @@ interface State {
|
||||
placeholder: string;
|
||||
hint: string;
|
||||
mode: string;
|
||||
hideMode: boolean,
|
||||
enableRender: boolean,
|
||||
showCopyButton: boolean,
|
||||
hideMode: boolean;
|
||||
enableRender: boolean;
|
||||
showCopyButton: boolean;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
@@ -59,7 +59,7 @@ class CodePromptModal extends PureComponent<Props, State> {
|
||||
hideMode: false,
|
||||
enableRender: false,
|
||||
showCopyButton: false,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
_onModeChange: Function = () => {};
|
||||
|
||||
@@ -39,7 +39,7 @@ class CookieModifyModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
cookie: null,
|
||||
rawValue: '',
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -34,7 +34,7 @@ class CookiesModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
filter: '',
|
||||
visibleCookieIndexes: null,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -32,7 +32,7 @@ class EnvironmentEditModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
requestGroup: null,
|
||||
isValid: true,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
_envEditor: EnvironmentEditor | null = null;
|
||||
|
||||
@@ -24,7 +24,7 @@ class ErrorModal extends PureComponent<{}, ErrorModalOptions> {
|
||||
error: null,
|
||||
message: '',
|
||||
addCancel: false,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(m: Modal) {
|
||||
this.modal = m;
|
||||
|
||||
@@ -36,7 +36,7 @@ class ExportRequestsModal extends PureComponent<Props, State> {
|
||||
|
||||
state: State = {
|
||||
treeRoot: null,
|
||||
}
|
||||
};
|
||||
|
||||
setModalRef(modal: Modal) {
|
||||
if (modal != null) {
|
||||
|
||||
@@ -15,7 +15,7 @@ interface State {
|
||||
class FilterHelpModal extends PureComponent<{}, State> {
|
||||
state: State = {
|
||||
isJson: true,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class GenerateConfigModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
configs: [],
|
||||
activeTab: 0,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -40,7 +40,7 @@ class GitBranchesModal extends PureComponent<Props, State> {
|
||||
branches: [],
|
||||
remoteBranches: [],
|
||||
newBranchName: '',
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(ref: Modal) {
|
||||
this.modal = ref;
|
||||
|
||||
@@ -26,7 +26,7 @@ class GitLogModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
logs: [],
|
||||
branch: '??',
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(ref: Modal) {
|
||||
this.modal = ref;
|
||||
|
||||
@@ -32,7 +32,7 @@ class GitRepositorySettingsModal extends PureComponent<{}, State> {
|
||||
state: State = {
|
||||
inputs: {},
|
||||
gitRepository: null,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -24,7 +24,7 @@ class LoginModal extends PureComponent<{}, State> {
|
||||
error: '',
|
||||
title: '',
|
||||
message: '',
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
_passwordInput: HTMLInputElement | null = null;
|
||||
|
||||
@@ -26,7 +26,7 @@ interface State {
|
||||
class NunjucksModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
defaultTemplate: '',
|
||||
}
|
||||
};
|
||||
|
||||
_onDone: Function | null = null;
|
||||
_currentTemplate: string | null = null;
|
||||
|
||||
@@ -19,7 +19,7 @@ import HelpTooltip from '../help-tooltip';
|
||||
|
||||
export type ReduxProps = ReturnType<typeof mapStateToProps> & ReturnType<typeof mapDispatchToProps>;
|
||||
|
||||
type Props = ReduxProps
|
||||
type Props = ReduxProps;
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
class ProjectSettingsModal extends PureComponent<Props> {
|
||||
|
||||
@@ -25,7 +25,7 @@ interface State {
|
||||
cancelable?: boolean | null;
|
||||
onComplete?: (arg0: string) => Promise<void> | void;
|
||||
onCancel?: (() => void) | null;
|
||||
onHide?: () => void,
|
||||
onHide?: () => void;
|
||||
onDeleteHint?: ((arg0: string) => void) | null;
|
||||
currentValue: string;
|
||||
loading: boolean;
|
||||
@@ -45,7 +45,7 @@ export interface PromptModalOptions {
|
||||
label?: string;
|
||||
hints?: string[];
|
||||
onComplete?: (arg0: string) => Promise<void> | void;
|
||||
onHide?: () => void,
|
||||
onHide?: () => void;
|
||||
onDeleteHint?: (arg0: string) => void;
|
||||
onCancel?: () => void;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class PromptModal extends PureComponent<{}, State> {
|
||||
onHide: undefined,
|
||||
currentValue: '',
|
||||
loading: false,
|
||||
}
|
||||
};
|
||||
|
||||
async _done(rawValue: string) {
|
||||
const { onComplete, upperCase } = this.state;
|
||||
|
||||
@@ -38,7 +38,7 @@ class RequestCreateModal extends PureComponent<{}, State> {
|
||||
selectedContentType: null,
|
||||
selectedMethod: METHOD_GET,
|
||||
parentId: null,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
_input: HTMLInputElement | null = null;
|
||||
|
||||
@@ -21,7 +21,7 @@ class RequestRenderErrorModal extends PureComponent<{}, State> {
|
||||
state: State = {
|
||||
error: null,
|
||||
request: null,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class RequestSettingsModal extends PureComponent<Props, State> {
|
||||
workspaces: [],
|
||||
justCopied: false,
|
||||
justMoved: false,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -87,7 +87,7 @@ class RequestSwitcherModal extends PureComponent<Props, State> {
|
||||
hideNeverActiveRequests: false,
|
||||
isModalVisible: true,
|
||||
title: null,
|
||||
}
|
||||
};
|
||||
|
||||
_handleInputKeydown(e: React.KeyboardEvent<HTMLDivElement>) {
|
||||
const keyCode = e.keyCode;
|
||||
|
||||
@@ -26,7 +26,7 @@ class ResponseDebugModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
response: null,
|
||||
title: '',
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -37,7 +37,7 @@ interface State {
|
||||
class SettingsModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
currentTabIndex: null,
|
||||
}
|
||||
};
|
||||
|
||||
modal: Modal | null = null;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class SyncBranchesModal extends PureComponent<Props, State> {
|
||||
branches: [],
|
||||
remoteBranches: [],
|
||||
currentBranch: '',
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(m: Modal) {
|
||||
this.modal = m;
|
||||
|
||||
@@ -32,7 +32,7 @@ class SyncHistoryModal extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
branch: '',
|
||||
history: [],
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(m: Modal) {
|
||||
this.modal = m;
|
||||
|
||||
@@ -27,7 +27,7 @@ class SyncMergeModal extends PureComponent<Props, State> {
|
||||
|
||||
state: State = {
|
||||
conflicts: [],
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(n: Modal) {
|
||||
this.modal = n;
|
||||
|
||||
@@ -35,7 +35,7 @@ interface FormFields {
|
||||
}
|
||||
|
||||
interface InnerProps extends Options, Props {
|
||||
hide: () => void,
|
||||
hide: () => void;
|
||||
}
|
||||
|
||||
const ProjectOption: FC<Project> = project => (
|
||||
|
||||
+3
-3
@@ -152,7 +152,7 @@ class WorkspaceEnvironmentsEditModal extends PureComponent<Props, State> {
|
||||
subEnvironments: [],
|
||||
rootEnvironment: null,
|
||||
selectedEnvironmentId: null,
|
||||
}
|
||||
};
|
||||
|
||||
colorChangeTimeout: NodeJS.Timeout | null = null;
|
||||
|
||||
@@ -367,7 +367,7 @@ class WorkspaceEnvironmentsEditModal extends PureComponent<Props, State> {
|
||||
))).then(() => {
|
||||
db.flushChanges();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_handleClickColorChange(environment: Environment) {
|
||||
if (!environment.color) {
|
||||
@@ -426,7 +426,7 @@ class WorkspaceEnvironmentsEditModal extends PureComponent<Props, State> {
|
||||
|
||||
handleChangeEnvironment(environment._id);
|
||||
this._handleShowEnvironment(environment);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
|
||||
@@ -63,7 +63,7 @@ class WorkspaceSettingsModal extends PureComponent<Props, State> {
|
||||
isPrivate: false,
|
||||
showDescription: false,
|
||||
defaultPreviewMode: false,
|
||||
}
|
||||
};
|
||||
|
||||
_workspaceUpdate(patch: Record<string, any>) {
|
||||
models.workspace.update(this.props.workspace, patch);
|
||||
|
||||
@@ -26,7 +26,7 @@ class WrapperModal extends PureComponent<{}, State> {
|
||||
tall: false,
|
||||
skinny: false,
|
||||
wide: false,
|
||||
}
|
||||
};
|
||||
|
||||
_setModalRef(m: Modal) {
|
||||
this.modal = m;
|
||||
|
||||
@@ -7,8 +7,8 @@ import { HandleRender } from '../../common/render';
|
||||
import CopyButton from './base/copy-button';
|
||||
|
||||
interface Props {
|
||||
request: any,
|
||||
handleRender: HandleRender,
|
||||
request: any;
|
||||
handleRender: HandleRender;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -13,7 +13,7 @@ class RenderedText extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
renderedText: '',
|
||||
error: '',
|
||||
}
|
||||
};
|
||||
|
||||
async _render() {
|
||||
const { render, children } = this.props;
|
||||
|
||||
@@ -56,7 +56,7 @@ class RequestUrlBar extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
currentInterval: null,
|
||||
currentTimeout: null,
|
||||
}
|
||||
};
|
||||
|
||||
_lastPastedText: string | null = null;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class General extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
fonts: null,
|
||||
fontsMono: null,
|
||||
}
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
const allFonts = await fontScanner.getAvailableFonts();
|
||||
|
||||
@@ -48,7 +48,7 @@ class Plugins extends PureComponent<Props, State> {
|
||||
installPluginErrMsg: '',
|
||||
isInstallingFromNpm: false,
|
||||
isRefreshingPlugins: false,
|
||||
}
|
||||
};
|
||||
|
||||
_handleClearError() {
|
||||
this.setState({ error: null });
|
||||
|
||||
@@ -242,7 +242,7 @@ const IndividualTheme: FC<{
|
||||
isLight: boolean;
|
||||
isInOsThemeMode: boolean;
|
||||
onChangeTheme: (name: string, mode: ColorScheme) => Promise<void>;
|
||||
theme: PluginTheme
|
||||
theme: PluginTheme;
|
||||
}> = ({
|
||||
isActive,
|
||||
isDark,
|
||||
|
||||
@@ -49,7 +49,7 @@ interface State {
|
||||
class UnconnectedSidebarRequestGroupRow extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
dragDirection: 0,
|
||||
}
|
||||
};
|
||||
|
||||
private dropdownRef = createRef<UnconnectedRequestGroupActionsDropdown>();
|
||||
private expandTagRef = createRef<HTMLDivElement>();
|
||||
|
||||
@@ -56,7 +56,7 @@ class UnconnectedSidebarRequestRow extends PureComponent<Props, State> {
|
||||
dragDirection: 0,
|
||||
isEditing: false,
|
||||
renderedUrl: '',
|
||||
}
|
||||
};
|
||||
|
||||
_urlUpdateInterval: NodeJS.Timeout | null = null;
|
||||
_requestActionsDropdown: RequestActionsDropdown | null = null;
|
||||
|
||||
@@ -29,7 +29,7 @@ class SpecEditorSidebar extends Component<Props, State> {
|
||||
state: State = {
|
||||
error: '',
|
||||
specContentJSON: false,
|
||||
}
|
||||
};
|
||||
|
||||
_handleScrollEditor(pos: {
|
||||
start: {
|
||||
|
||||
@@ -64,7 +64,7 @@ class TagEditor extends PureComponent<Props, State> {
|
||||
preview: '',
|
||||
error: '',
|
||||
variables: [],
|
||||
}
|
||||
};
|
||||
|
||||
async load() {
|
||||
const activeTagData = templateUtils.tokenizeTag(this.props.defaultValue);
|
||||
|
||||
@@ -21,7 +21,7 @@ class TimeFromNow extends PureComponent<Props, State> {
|
||||
|
||||
state: State = {
|
||||
text: '',
|
||||
}
|
||||
};
|
||||
|
||||
_update() {
|
||||
const { timestamp, capitalize } = this.props;
|
||||
|
||||
@@ -65,7 +65,7 @@ class Toast extends PureComponent<{}, State> {
|
||||
notification: null,
|
||||
visible: false,
|
||||
appName: getAppName(),
|
||||
}
|
||||
};
|
||||
|
||||
_handlePostCTACleanup() {
|
||||
const { notification } = this.state;
|
||||
|
||||
@@ -16,12 +16,12 @@ interface Props {
|
||||
}
|
||||
|
||||
interface State {
|
||||
left: number | null,
|
||||
top: number | null,
|
||||
bottom: number | null,
|
||||
right: number | null,
|
||||
maxWidth: number | null,
|
||||
maxHeight: number | null,
|
||||
left: number | null;
|
||||
top: number | null;
|
||||
bottom: number | null;
|
||||
right: number | null;
|
||||
maxWidth: number | null;
|
||||
maxHeight: number | null;
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class Tooltip extends PureComponent<Props, State> {
|
||||
maxWidth: null,
|
||||
maxHeight: null,
|
||||
visible: false,
|
||||
}
|
||||
};
|
||||
|
||||
_setTooltipRef(n: HTMLDivElement) {
|
||||
this._tooltip = n;
|
||||
|
||||
@@ -18,7 +18,7 @@ interface State {
|
||||
class ResponseCSVViewer extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
result: null,
|
||||
}
|
||||
};
|
||||
|
||||
currentHash = '';
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { showModal } from '../modals/index';
|
||||
import SettingsModal from '../modals/settings-modal';
|
||||
|
||||
interface Props {
|
||||
error: string,
|
||||
url: string,
|
||||
fontSize: number,
|
||||
error: string;
|
||||
url: string;
|
||||
fontSize: number;
|
||||
}
|
||||
class ResponseError extends PureComponent<Props> {
|
||||
render() {
|
||||
|
||||
@@ -56,7 +56,7 @@ class ResponseMultipart extends PureComponent<Props, State> {
|
||||
activePart: -1,
|
||||
parts: [],
|
||||
error: null,
|
||||
}
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this._setParts();
|
||||
|
||||
@@ -5,9 +5,9 @@ import { AUTOBIND_CFG } from '../../../common/constants';
|
||||
import CodeEditor from '../codemirror/code-editor';
|
||||
|
||||
interface Props {
|
||||
value: string,
|
||||
fontSize?: number,
|
||||
responseId?: string,
|
||||
value: string;
|
||||
fontSize?: number;
|
||||
responseId?: string;
|
||||
}
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
class ResponseRaw extends PureComponent<Props> {
|
||||
|
||||
@@ -6,10 +6,10 @@ import { Response } from '../../../models/response';
|
||||
import CodeEditor from '../codemirror/code-editor';
|
||||
|
||||
interface Props {
|
||||
response: Response,
|
||||
editorFontSize: number,
|
||||
editorIndentSize: number,
|
||||
editorLineWrapping: boolean,
|
||||
response: Response;
|
||||
editorFontSize: number;
|
||||
editorIndentSize: number;
|
||||
editorLineWrapping: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -57,7 +57,7 @@ class ResponseViewer extends Component<Props, State> {
|
||||
blockingBecauseTooLarge: false,
|
||||
bodyBuffer: null,
|
||||
error: '',
|
||||
}
|
||||
};
|
||||
|
||||
refresh() {
|
||||
// @ts-expect-error -- TSCONVERSION refresh only exists on a code-editor, not response-raw
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { WrapperProps } from './wrapper';
|
||||
|
||||
interface Props {
|
||||
wrapperProps: WrapperProps;
|
||||
handleActivityChange: (options: {workspaceId?: string, nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleActivityChange: (options: {workspaceId?: string; nextActivity: GlobalActivity}) => Promise<void>;
|
||||
gridRight: ReactNode;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import type { WrapperProps } from './wrapper';
|
||||
interface Props {
|
||||
forceRefreshKey: number;
|
||||
gitSyncDropdown: ReactNode;
|
||||
handleActivityChange: (options: {workspaceId?: string, nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleActivityChange: (options: {workspaceId?: string; nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleChangeEnvironment: Function;
|
||||
handleDeleteResponse: Function;
|
||||
handleDeleteResponses: Function;
|
||||
|
||||
@@ -21,7 +21,7 @@ const spectral = initializeSpectral();
|
||||
|
||||
interface Props {
|
||||
gitSyncDropdown: ReactNode;
|
||||
handleActivityChange: (options: {workspaceId?: string, nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleActivityChange: (options: {workspaceId?: string; nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleUpdateApiSpec: (s: ApiSpec) => Promise<void>;
|
||||
wrapperProps: WrapperProps;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import type { WrapperProps } from './wrapper';
|
||||
interface Props {
|
||||
children: SidebarChildObjects;
|
||||
gitSyncDropdown: ReactNode;
|
||||
handleActivityChange: (options: {workspaceId?: string, nextActivity: GlobalActivity}) => Promise<void>;
|
||||
handleActivityChange: (options: {workspaceId?: string; nextActivity: GlobalActivity}) => Promise<void>;
|
||||
wrapperProps: WrapperProps;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ export type WrapperProps = AppProps & {
|
||||
isVariableUncovered: boolean;
|
||||
vcs: VCS | null;
|
||||
gitVCS: GitVCS | null;
|
||||
}
|
||||
};
|
||||
|
||||
interface State {
|
||||
forceRefreshKey: number;
|
||||
@@ -151,7 +151,7 @@ class Wrapper extends PureComponent<WrapperProps, State> {
|
||||
state: State = {
|
||||
forceRefreshKey: Date.now(),
|
||||
activeGitBranch: 'no-vcs',
|
||||
}
|
||||
};
|
||||
|
||||
// Request updaters
|
||||
async _handleForceUpdateRequest(r: Request, patch: Partial<Request>) {
|
||||
@@ -230,7 +230,7 @@ class Wrapper extends PureComponent<WrapperProps, State> {
|
||||
return null;
|
||||
}
|
||||
|
||||
async _handleWorkspaceActivityChange({ workspaceId, nextActivity }: {workspaceId?: string, nextActivity: GlobalActivity}) {
|
||||
async _handleWorkspaceActivityChange({ workspaceId, nextActivity }: {workspaceId?: string; nextActivity: GlobalActivity}) {
|
||||
const { activity, activeApiSpec, handleSetActiveActivity } = this.props;
|
||||
|
||||
// Remember last activity on workspace for later, but only if it isn't HOME
|
||||
|
||||
@@ -127,19 +127,19 @@ import { AppHooks } from './app-hooks';
|
||||
export type AppProps = ReturnType<typeof mapStateToProps> & ReturnType<typeof mapDispatchToProps>;
|
||||
|
||||
interface State {
|
||||
showDragOverlay: boolean,
|
||||
draggingSidebar: boolean,
|
||||
draggingPaneHorizontal: boolean,
|
||||
draggingPaneVertical: boolean,
|
||||
sidebarWidth: number,
|
||||
paneWidth: number,
|
||||
paneHeight: number,
|
||||
isVariableUncovered: boolean,
|
||||
vcs: VCS | null,
|
||||
gitVCS: GitVCS | null,
|
||||
forceRefreshCounter: number,
|
||||
forceRefreshHeaderCounter: number,
|
||||
isMigratingChildren: boolean,
|
||||
showDragOverlay: boolean;
|
||||
draggingSidebar: boolean;
|
||||
draggingPaneHorizontal: boolean;
|
||||
draggingPaneVertical: boolean;
|
||||
sidebarWidth: number;
|
||||
paneWidth: number;
|
||||
paneHeight: number;
|
||||
isVariableUncovered: boolean;
|
||||
vcs: VCS | null;
|
||||
gitVCS: GitVCS | null;
|
||||
forceRefreshCounter: number;
|
||||
forceRefreshHeaderCounter: number;
|
||||
isMigratingChildren: boolean;
|
||||
}
|
||||
|
||||
@autoBindMethodsForReact(AUTOBIND_CFG)
|
||||
|
||||
@@ -27,9 +27,9 @@ const initialState: State = {
|
||||
|
||||
type Action =
|
||||
| { type: 'loadBackendProjects' }
|
||||
| { type: 'saveBackendProjects', local: State['localBackendProjects'], remote: State['remoteBackendProjects']}
|
||||
| { type: 'startPullingBackendProject', backendProjectId: string }
|
||||
| { type: 'stopPullingBackendProject', backendProjectId: string }
|
||||
| { type: 'saveBackendProjects'; local: State['localBackendProjects']; remote: State['remoteBackendProjects']}
|
||||
| { type: 'startPullingBackendProject'; backendProjectId: string }
|
||||
| { type: 'stopPullingBackendProject'; backendProjectId: string };
|
||||
|
||||
const reducer: Reducer<State, Action> = (prevState, action) => {
|
||||
switch (action.type) {
|
||||
|
||||
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user