Fiszcz/OLX-flats-notificator

View on GitHub
src/LocationFinder/LocationFinder.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function getTextOfLocation has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

const getTextOfLocation = (textWithLocation: string) => {
    let wordsCount = 0,
        isSpaceBetweenWords = false,
        lengthOfWord = 0,
        addressStringLength = 0;
Severity: Minor
Found in src/LocationFinder/LocationFinder.ts - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getTextOfLocation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getTextOfLocation = (textWithLocation: string) => {
    let wordsCount = 0,
        isSpaceBetweenWords = false,
        lengthOfWord = 0,
        addressStringLength = 0;
Severity: Minor
Found in src/LocationFinder/LocationFinder.ts - About 1 hr to fix

    Expected linebreak to be 'CRLF'
    Open

    import { locationKeywords } from '../../config/locationKeywords';
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    };
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            lengthOfWord = 0,
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

        for (const letter of textWithLocation) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                    break;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                    }
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    };
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 isSpaceSignBetweenWords = (letter: string) => spaceSignBetweenWordsREGEX.test(letter);
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (isEndOfSentence(letter, lengthOfWord)) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            } else if (isSpaceBetweenWords) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            } else lengthOfWord++;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 upperCaseOrDigitREGEX = /^[A-ZŻŹĆĄŚĘŁÓŃ0-9]$/;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            addressStringLength = 0;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 textWithLocation.slice(0, addressStringLength - Number(isSpaceBetweenWords));
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (positionInText === -1) return undefined;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                        break;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            addressStringLength++;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

        }
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                }
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                break;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 isUpperCaseOrDigit = (letter: string) => upperCaseOrDigitREGEX.test(letter);
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (isUpperCaseOrDigit(letter)) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 spaceSignBetweenWordsREGEX = /^[ "„.]$/;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    // proposal: use Machine Learning instead manual finding of location
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

        let wordsCount = 0,
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                } else break;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 isLetterOrDigit = (letter: string) => letterOrDigitREGEX.test(letter);
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 positionInText = text.search(locationKeywords.specificLocalization);
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                    isSpaceBetweenWords = true;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 getTextOfLocation(text.slice(positionInText));
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (++wordsCount === 4) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                }
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                    lengthOfWord = 1;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 isEndOfSentence = (letter: string, lengthPreviousWord: number) => letter === '.' && lengthPreviousWord > 2;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 isPerfectLocation = (text: string): boolean => text.search(locationKeywords.perfectLocalization) >= 0;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 findLocationOfFlatInDescription = (text: string): string | undefined => {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 getTextOfLocation = (textWithLocation: string) => {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (isSpaceBetweenWords === false) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            } else if (isLetterOrDigit(letter) === false) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

            isSpaceBetweenWords = false,
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

    
    
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 letterOrDigitREGEX = /^[a-zżźćńółęąś0-9]$/i;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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: describe rules of location text in documentation
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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 (isSpaceSignBetweenWords(letter)) {
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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

                    isSpaceBetweenWords = false;
    Severity: Minor
    Found in src/LocationFinder/LocationFinder.ts by tslint

    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