Skip to content

Commit

Permalink
added clarity for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
jina2k committed Mar 28, 2022
1 parent 6c6d51a commit bf28afa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

/src/*
!/src/client*
# ignores all src files, except for src/client*, same result as below
# src/{server,bin,scripts,common}/**/*.{ts,tsx,js,jsx}
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"no-trailing-spaces": [2],
"linebreak-style": [
"error",
"unix"
Expand Down Expand Up @@ -100,6 +101,7 @@
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"no-trailing-spaces": [2],
"linebreak-style": [
"error",
"unix"
Expand Down
3 changes: 1 addition & 2 deletions src/client/app/actions/meters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export function changeDisplayedMeters(meters: number[]): t.ChangeDisplayedMeters
return { type: ActionType.ChangeDisplayedMeters, selectedMeters: meters};
}

export function editMeterDetails(meter: MeterMetadata):
t.EditMeterDetailsAction {
export function editMeterDetails(meter: MeterMetadata): t.EditMeterDetailsAction {
return { type: ActionType.EditMeterDetails, meter };
}

Expand Down
3 changes: 2 additions & 1 deletion src/client/app/utils/calculateCompare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export function calculateCompareTimeInterval(comparePeriod: ComparePeriod, curre
default:
throw new Error(`Unknown period value: ${comparePeriod}`);
}
return new TimeInterval(begin, end);
const compareTimeInterval = new TimeInterval(begin, end);
return compareTimeInterval;
}

export function calculateCompareDuration(comparePeriod: ComparePeriod): moment.Duration {
Expand Down
5 changes: 3 additions & 2 deletions src/client/app/utils/calibration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,11 @@ export function normalizeImageDimensions(dimensions: Dimensions): Dimensions {
height = 500;
width = 500 * dimensions.width / dimensions.height;
}
return {
const res: Dimensions = {
width,
height
};
}
return res;
}

/**
Expand Down

0 comments on commit bf28afa

Please sign in to comment.