eoin-obrien/ul-timetable

View on GitHub

Showing 52 of 52 total issues

When chaining calls, put method calls on new lines.
Open

      name: $(teachingWeekSelector, row).text(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

      roomIds: parseRoomIds($(roomIdSelector, moduleTimetable).text()),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const splitIds = roomIdString.toUpperCase().trim().split(/\s+/g);
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

Use 'undefined' instead of 'null'
Open

    return null;
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: no-null-keyword

Disallows use of the null keyword literal.

Rationale

Instead of having the dual concepts of null andundefined in a codebase, this rule ensures that only undefined is used.

JavaScript originally intended undefined to refer to a value that doesn't yet exist, while null was meant to refer to a value that does exist but points to nothing. That's confusing. undefined is the default value when object members don't exist, and is the return value for newer native collection APIs such as Map.get when collection values don't exist.

const myObject = {};
myObject.doesNotExist; // undefined
const myMap = new Map<string number>();
myMap.get("doesNotExist"); // undefined</string>

To remove confusion over the two similar values, it's better to stick with just undefined.

Notes
  • Has Fix

Config

Not configurable.

Examples
"no-null-keyword": true

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    moduleId: $(moduleIdSelector).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    info: $(infoSelector).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

      info: $(infoSelector, moduleTimetable).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

Use 'undefined' instead of 'null'
Open

    return null;
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: no-null-keyword

Disallows use of the null keyword literal.

Rationale

Instead of having the dual concepts of null andundefined in a codebase, this rule ensures that only undefined is used.

JavaScript originally intended undefined to refer to a value that doesn't yet exist, while null was meant to refer to a value that does exist but points to nothing. That's confusing. undefined is the default value when object members don't exist, and is the return value for newer native collection APIs such as Map.get when collection values don't exist.

const myObject = {};
myObject.doesNotExist; // undefined
const myMap = new Map<string number>();
myMap.get("doesNotExist"); // undefined</string>

To remove confusion over the two similar values, it's better to stick with just undefined.

Notes
  • Has Fix

Config

Not configurable.

Examples
"no-null-keyword": true

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const weeks = weekIdString.slice(weekIdString.indexOf(':') + 1).trim().split(',');
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

      startDate: moment.tz($(startDateSelector, row).text(), weekDateFormat, timezone).toDate(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    id: $(idSelector).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    info: $(infoSelector).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    $(lessonSelector, timetableDay).each((_: number, lesson: CheerioElement) => {
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const date = `${$(dateSelector).text().trim()} ${$(timeSelector).text().trim()}`;
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const date = `${$(dateSelector).text().trim()} ${$(timeSelector).text().trim()}`;
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

      moduleId: $(moduleIdSelector, moduleTimetable).text().trim(),
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const splitIds = roomIdString.toUpperCase().trim().split(/\s+/g);
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  const weeks = weekIdString.slice(weekIdString.indexOf(':') + 1).trim().split(',');
Severity: Minor
Found in src/util/attribute-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  $(moduleTimetableSelector).each((_: number, moduleTimetable: CheerioElement) => {
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

  $(weekSelector).each((_: number, row: CheerioElement) => {
Severity: Minor
Found in src/util/timetable-parsers.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

Severity
Category
Status
Source
Language