Showing 28 of 89 total issues
Function Requester
has 326 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Requester() {
const worker = useMemo<SetupWorker>(() => setupWorker(), []);
const [reqEditorVal, setReqEditorVal] = useState(
prettyPrintJSON(reqEditorDefaultVal)
);
Function App
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function App() {
const { width } = useWindowSize();
return (
<Box
width="100%"
Function storeStructToOpenApi
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const storeStructToOpenApi: StoreStructToOpenApi = async (store) => {
const spec: OpenApiBuilder = OpenApiBuilder.create();
// The library assumes 3.0.0, but the generated spec is 3.1.0
spec.rootDoc.openapi = "3.1.0";
Function HowItWorks
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function HowItWorks() {
const { width } = useWindowSize();
const isLargeScreen = width && width > 600;
const flexFlow = isLargeScreen ? "row nowrap" : "column nowrap";
Function getResponse
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getResponse(event, client, requestId) {
const beforeRequestTime = Date.now()
const { request } = event
const clonedRequest = request.clone()
Function Title
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Title() {
return (
<Heading as="h1" margin="32px 0" maxWidth="850px">
<br />
<Link
Function getResponse
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getResponse(event, client, requestId) {
const beforeRequestTime = Date.now()
const { request } = event
const clonedRequest = request.clone()
Function update
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async update(message: Message): Promise<void> {
const data = message.get();
const status = `s${data.response.status}`;
const url = new URL(data.request.url);
const { pathToStoreRoute, pathname } = Store.getPathToStoreRoute({
Function RenderBox
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RenderBox = (props: Item) => {
const height = `${Math.max(props.height, MIN_DIMENSION)}px`;
const width = `${Math.max(props.width, MIN_DIMENSION)}px`;
const bgs: Array<string> = [
COLOR_WHITE,
Function AnimationEffect
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AnimationEffect(props: {
bg: typeof COLOR_PRIMARY | typeof COLOR_SECONDARY;
}) {
const [itemsFirst, setItemsFirst] = useState<Array<Item>>([]);
Function createStoreStructureAndExpectedForSingleMessage
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createStoreStructureAndExpectedForSingleMessage = async (
message = createMessage()
): Promise<CreateStoreStructureAndExpectedForSingleMessageReturns> => {
const data = message.get();
const url = new URL(data.request.url);
Function LatencySlider
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function LatencySlider(props: Props) {
const sliderValue = props.value;
const setSliderValue = props.setValue;
const [showTooltip, setShowTooltip] = useState(false);
return (
Function _createPayload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _createPayload(event, response, beforeRequestTime, afterRequestTime, requestBody) {
const request = event.request
const requestHeaders = {};
for (const [key, value] of request.headers) {
requestHeaders[key] = value;
Function _createPayload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _createPayload(event, response, beforeRequestTime, afterRequestTime, requestBody) {
const request = event.request
const requestHeaders = {};
for (const [key, value] of request.headers) {
requestHeaders[key] = value;
Function _createPayload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _createPayload(event, response, beforeRequestTime, afterRequestTime, requestBody) {
const request = event.request
const requestHeaders = {};
for (const [key, value] of request.headers) {
requestHeaders[key] = value;
Function _createPayload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _createPayload(event, response, beforeRequestTime, afterRequestTime, requestBody) {
const request = event.request
const requestHeaders = {};
for (const [key, value] of request.headers) {
requestHeaders[key] = value;
Function SkeletonLanding
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SkeletonLanding() {
const [isLoaded, setIsLoaded] = useState(false);
return (
<Stack padding={4} spacing={1} width="300px">
<Skeleton
Function onClickMockRequest
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onClickMockRequest = async (e: MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
if (!worker) {
return;
}
Function _createPayload
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _createPayload(request, response, beforeRequestTime, afterRequestTime) {
const requestHeaders = {};
for (const [key, value] of request.headers) {
requestHeaders[key] = value;
}
Function App
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function App() {
const [open, setOpen] = useState(false);
const [storeStruct, setStoreStruct] = useState<StoreStructure | null>(null);
const { store } = useContext(Ctx);