Skip to content

Commit 4456b2e

Browse files
committed
eliminate code warnings
1 parent ae99b9e commit 4456b2e

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/util/getTechColor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Tech from '@/services/enum/Tech'
55
* @param tech Tech card
66
* @returns Color code
77
*/
8-
export default function(tech: Tech) : string {
8+
export default function getTechColor(tech: Tech) : string {
99
switch (tech) {
1010
case Tech.AGRICULTURE: return '#47914d'
1111
case Tech.ARMY: return '#ce372f'

src/util/getTechDuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Tech from '@/services/enum/Tech'
66
* @param round Age
77
* @returns Tech duration
88
*/
9-
export default function(tech: Tech, round: number) : number {
9+
export default function getTechDuration(tech: Tech, round: number) : number {
1010
const index = round - 1
1111
switch (tech) {
1212
case Tech.AGRICULTURE: return [2,3,1,2,1,1,2,1][index]

src/util/toTech.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import TechPlaceholder from '@/services/enum/TechPlaceholder'
55
* Converts tech placeholder to undefined, keeps tech as is.
66
* @returns Tech or undefined
77
*/
8-
export default function(tech: (Tech|TechPlaceholder)) : Tech|undefined {
8+
export default function toTech(tech: (Tech|TechPlaceholder)) : Tech|undefined {
99
if (tech == TechPlaceholder.BLANK || tech == TechPlaceholder.EMPTY) {
1010
return undefined
1111
}

tests/unit/helper/mockRound.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Player from '@/services/enum/Player'
22
import { BotCardsPersistence, ProsperityCardsPersistence, Round, RowPlaceholdersPersistence, TechCardSelectionPersistence } from '@/store/state'
33

4-
export default function (params?: MockRoundParams) : Round {
4+
export default function mockRound(params?: MockRoundParams) : Round {
55
const round : Round = {
66
round: params?.round ?? 1,
77
startPlayer: params?.startPlayer ?? Player.PLAYER,

tests/unit/helper/mockRouteLocation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LocationQuery, RouteLocation, RouteMeta, RouteParams, RouteRecord, RouteRecordName } from 'vue-router'
22

3-
export default function (params?: MockRouteLocationParams) : RouteLocation {
3+
export default function mockRouteLocation(params?: MockRouteLocationParams) : RouteLocation {
44
return {
55
name: params?.name,
66
path: params?.path ?? '',

tests/unit/helper/mockState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import DifficultyLevel from '@/services/enum/DifficultyLevel'
22
import Player from '@/services/enum/Player'
33
import { Round, State } from '@/store/state'
44

5-
export default function (params?: MockStateParams) : State {
5+
export default function mockState(params?: MockStateParams) : State {
66
return {
77
language: 'en',
88
baseFontSize: 1,

0 commit comments

Comments
 (0)