Fiszcz/OLX-flats-notificator

View on GitHub
src/TransportConnection/TransportConnection.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function checkTransportTime has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const checkTransportTime = async (flatLocation: string): Promise<TransportInformation[]> => {
    const flatLocationForAPI = flatLocation.split(' ').join('+');
    const requests = transportDestinations.map(destination =>
        axios
            .get<DirectionsResult>(getGoogleMapsAPIUrlRequest(flatLocationForAPI, destination.locationToAPI))
Severity: Minor
Found in src/TransportConnection/TransportConnection.ts - About 1 hr to fix

    Expected linebreak to be 'CRLF'
    Open

        transportDestination as transportDestinationJSON,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        return (

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    };

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    } from '../../config/config.json';

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        transportMode,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    }

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    
    

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            '?origin=' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    
    

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    import axios from 'axios';

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        departureTime as departureTimeJSON,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    
    

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    }));

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        maxTime: destination.maxTransportTime,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            flatLocation +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            '&mode=' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            timeInMinutes: NaN,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    import DirectionsResult = google.maps.DirectionsResult;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            '&key=' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            transportSteps: informationAboutTransport.steps,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        textTime: string;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            'https://maps.googleapis.com/maps/api/directions/json' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        console.log('[Google Maps]' + informationAboutTransport.duration.text + ' to ' + flatLocation);

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    import { DepartureTime, Weekdays } from '../DepartureTime/DepartureTime';

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    export const checkTransportTime = async (flatLocation: string): Promise<TransportInformation[]> => {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        const requests = transportDestinations.map(destination =>

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    export interface TransportInformation {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    const getGoogleMapsAPIUrlRequest = (flatLocation: string, transportDestination: string) => {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            (transportMode || 'driving') +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                // TODO: handle error

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        timeInMinutes: number;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                    }

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            '&departure_time=' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        );

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            location: destination.location,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    const transportDestinations = (transportDestinationJSON || []).map(destination => ({

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        locationToAPI: destination.location.replace(/[&,.\s\\/-]/g, '+'),

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    const departureDate = new DepartureTime(departureTimeJSON as { weekday: keyof typeof Weekdays; time: string });

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    
    

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            GoogleMapsKey

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                    if (Boolean(informationAboutTransport)) {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        transportSteps: DirectionsStep[];

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        hasSatisfiedTime?: boolean;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                .then(resp => resp.data.routes[0].legs[0])

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        GoogleMapsKey,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    
    

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        location: string;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            '&destination=' +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            location: destination.location,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    import DirectionsStep = google.maps.DirectionsStep;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        location: destination.location,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            transportDestination +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            departureDate.getDepartureTime() +

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                .then(informationAboutTransport => {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            textTime: informationAboutTransport.duration.text,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            hasSatisfiedTime: destination.maxTime >= timeInMinutes,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        );

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        } as TransportInformation;

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            textTime: 'Cannot check ☹️',

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        const timeInMinutes = Math.floor(informationAboutTransport.duration.value / 60);

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        ({

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                .get<DirectionsResult>(getGoogleMapsAPIUrlRequest(flatLocationForAPI, destination.locationToAPI))

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    import {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        const flatLocationForAPI = flatLocation.split(' ').join('+');

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                })

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                    () =>

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                ),

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            transportSteps: [],

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        } as TransportInformation),

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

        return Promise.all(requests).then(results => results.filter(result => result !== undefined) as TransportInformation[]);

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

    };

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

            axios

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                            timeInMinutes,

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                        return {

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    Expected linebreak to be 'CRLF'
    Open

                .catch(

    Rule: linebreak-style

    Enforces a consistent linebreak style.

    Notes
    • Has Fix

    Config

    One of the following options must be provided:

    • "LF" requires LF (\n) linebreaks
    • "CRLF" requires CRLF (\r\n) linebreaks
    Examples
    "linebreak-style": true,LF
    "linebreak-style": true,CRLF
    Schema
    {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ]
    }

    For more information see this page.

    There are no issues that match your filters.

    Category
    Status