Skip to content

Commit d5cb5c9

Browse files
Eliminate Code Warnings (#26)
1 parent 73fa001 commit d5cb5c9

24 files changed

Lines changed: 36 additions & 54 deletions

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescri
33
import pluginVitest from '@vitest/eslint-plugin'
44
import pluginPlaywright from 'eslint-plugin-playwright'
55
import i18nJsonPlugin from 'eslint-plugin-i18n-json'
6-
import path from 'path'
6+
import path from 'node:path'
77

88
export default defineConfigWithVueTs(
99
{

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<link rel="mask-icon" href="/img/icons/maskable-icon-512x512.png" color="#fff">
1313
<!-- Matomo Tracking: Cookie-less and GDPR-conformant -->
1414
<script>
15-
var _paq = window._paq = window._paq || [];
15+
var _paq = globalThis._paq = globalThis._paq || [];
1616
(function() {
1717
var u="//matomo.brdgm.me/";
1818
_paq.push(['setTrackerUrl', u+'matomo.php']);

package-lock.json

Lines changed: 4 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"generate-pwa-assets": "pwa-assets-generator"
1818
},
1919
"dependencies": {
20-
"@brdgm/brdgm-commons": "^1.7.4",
20+
"@brdgm/brdgm-commons": "^1.8.1",
2121
"@popperjs/core": "^2.11.8",
2222
"bootstrap": "^5.3.3",
2323
"core-js": "^3.40.0",

src/components/setup/DifficultyLevel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default defineComponent({
3636
},
3737
methods: {
3838
updateDifficultyLevel(event: Event) {
39-
this.difficultyLevel = parseInt((event.target as HTMLInputElement).value)
39+
this.difficultyLevel = Number.parseInt((event.target as HTMLInputElement).value)
4040
this.state.setup.difficultyLevel = this.difficultyLevel
4141
}
4242
}

src/services/CardDeck.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export default class CardDeck {
7676
public drawAll() : void {
7777
this._leftMajoritySlot = this.draw()
7878
this._rightMajoritySlot = this.draw()
79-
this._availableSlots.forEach(slot => this._slots.push({slot:slot, card:this.draw(), flipped:false}))
79+
for (const slot of this._availableSlots) {
80+
this._slots.push({slot:slot, card:this.draw(), flipped:false})
81+
}
8082
}
8183

8284
/**

src/services/Cards.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ const cards = [
512512
]
513513

514514
const cardsMap = new Map<string,Card>()
515-
cards.forEach(card => cardsMap.set(card.id, card))
515+
for (const card of cards) {
516+
cardsMap.set(card.id, card)
517+
}
516518

517519
export default {
518520

src/services/InitialLunaStates.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export default class InitialLunaStates {
3636
}
3737

3838
// draw cards for new round
39-
lunaStates.forEach(this.drawCards)
39+
for (const lunaState of lunaStates) {
40+
this.drawCards(lunaState)
41+
}
4042

4143
// store round
4244
const lunaStatesPersistence = lunaStates.map(item => item.toPersistence())

src/store/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const useStateStore = defineStore(`${name}.store`, {
88
state: () => {
99
return {
1010
language: 'en',
11-
baseFontSize: 1.0,
11+
baseFontSize: 1,
1212
setup: {
1313
playerSetup: {
1414
playerCount: 1,

src/util/AbstractNavigationState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export default abstract class AbstractNavigationState {
1919
this.playerColors = setup.playerSetup.playerColors
2020
this.botCount = setup.playerSetup.botCount
2121

22-
this.round = parseInt(route.params['round'] as string)
23-
this.turn = parseInt(route.params['turn'] as string)
22+
this.round = Number.parseInt(route.params['round'] as string)
23+
this.turn = Number.parseInt(route.params['turn'] as string)
2424
}
2525

2626
}

0 commit comments

Comments
 (0)