mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
chore: prettier all
This commit is contained in:
parent
4ab2d0556d
commit
54eb2a0dce
|
@ -23,6 +23,8 @@ module.exports = {
|
|||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/no-inferrable-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
|
||||
'react/prop-types': 'off',
|
||||
|
||||
'import/no-extraneous-dependencies': 'error',
|
||||
|
|
|
@ -19,11 +19,13 @@ export const linksCss = css`
|
|||
}
|
||||
`;
|
||||
|
||||
export const StyledMarkdownBlock = styled(PrismDiv as StyledComponent<
|
||||
'div',
|
||||
ResolvedThemeInterface,
|
||||
{ compact?: boolean; inline?: boolean }
|
||||
>)`
|
||||
export const StyledMarkdownBlock = styled(
|
||||
PrismDiv as StyledComponent<
|
||||
'div',
|
||||
ResolvedThemeInterface,
|
||||
{ compact?: boolean; inline?: boolean }
|
||||
>,
|
||||
)`
|
||||
|
||||
font-family: ${props => props.theme.typography.fontFamily};
|
||||
font-weight: ${props => props.theme.typography.fontWeightRegular};
|
||||
|
|
|
@ -148,7 +148,7 @@ export class OpenAPIParser {
|
|||
* @param obj object to dereference
|
||||
* @param forceCircular whether to dereference even if it is circular ref
|
||||
*/
|
||||
deref<T extends object>(obj: OpenAPIRef | T, forceCircular: boolean = false): T {
|
||||
deref<T extends object>(obj: OpenAPIRef | T, forceCircular = false): T {
|
||||
if (this.isRef(obj)) {
|
||||
const resolved = this.byRef<T>(obj.$ref)!;
|
||||
const visited = this._refCounter.visited(obj.$ref);
|
||||
|
|
|
@ -204,6 +204,7 @@ export class RedocNormalizedOptions {
|
|||
this.payloadSampleIdx = RedocNormalizedOptions.normalizePayloadSampleIdx(raw.payloadSampleIdx);
|
||||
this.expandSingleSchemaField = argValueToBoolean(raw.expandSingleSchemaField);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
this.unstable_ignoreMimeParameters = argValueToBoolean(raw.unstable_ignoreMimeParameters);
|
||||
|
||||
this.allowedMdComponents = raw.allowedMdComponents || {};
|
||||
|
|
|
@ -9,7 +9,7 @@ const EVENT = 'scroll';
|
|||
export class ScrollService {
|
||||
private _scrollParent: Window | HTMLElement | undefined;
|
||||
private _emiter: EventEmitter;
|
||||
private _prevOffsetY: number = 0;
|
||||
private _prevOffsetY = 0;
|
||||
constructor(private options: RedocNormalizedOptions) {
|
||||
this._scrollParent = IS_BROWSER ? window : undefined;
|
||||
this._emiter = new EventEmitter();
|
||||
|
|
5
src/types/components.d.ts
vendored
5
src/types/components.d.ts
vendored
|
@ -1,5 +0,0 @@
|
|||
import { AppStore } from '../services/AppStore';
|
||||
|
||||
export interface BaseContainerProps {
|
||||
store: AppStore;
|
||||
}
|
|
@ -8,7 +8,11 @@ describe('Utils', () => {
|
|||
const fn = (...args) => args;
|
||||
|
||||
const actual = mapWithLast(arr, fn);
|
||||
const expected = [[1, false], [2, false], [3, true]];
|
||||
const expected = [
|
||||
[1, false],
|
||||
[2, false],
|
||||
[3, true],
|
||||
];
|
||||
expect(actual).toEqual(expected);
|
||||
});
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ function throttle(func, wait) {
|
|||
const now = new Date().getTime();
|
||||
const remaining = wait - (now - previous);
|
||||
context = this;
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
args = arguments;
|
||||
if (remaining <= 0 || remaining > wait) {
|
||||
if (timeout) {
|
||||
|
|
|
@ -189,7 +189,7 @@ export function removeQueryString(serverUrl: string): string {
|
|||
function parseURL(url: string) {
|
||||
if (typeof URL === 'undefined') {
|
||||
// node
|
||||
return new (require('url')).URL(url);
|
||||
return new (require('url').URL)(url);
|
||||
} else {
|
||||
return new URL(url);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { dirname } from 'path';
|
||||
const URLtemplate = require('url-template');
|
||||
import * as URLtemplate from 'url-template';
|
||||
|
||||
import { FieldModel } from '../services/models';
|
||||
import { OpenAPIParser } from '../services/OpenAPIParser';
|
||||
|
|
Loading…
Reference in New Issue
Block a user