diff --git a/.idea/HitOrMiss.iml b/.idea/HitOrMiss.iml
index ab05643..bac5a62 100644
--- a/.idea/HitOrMiss.iml
+++ b/.idea/HitOrMiss.iml
@@ -16,6 +16,8 @@
+
+
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index f986f2f..df209e9 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -7,6 +7,7 @@
+
@@ -15,6 +16,7 @@
+
diff --git a/.idea/runConfigurations/server_tests.xml b/.idea/runConfigurations/server_tests.xml
index 228d481..b8f8f09 100644
--- a/.idea/runConfigurations/server_tests.xml
+++ b/.idea/runConfigurations/server_tests.xml
@@ -6,7 +6,7 @@
$PROJECT_DIR$/server
true
bdd
- --require ts-node/register/transpile-only --exit
+ -r ts-node/register/transpile-only -r tsconfig-paths/register --exit
PATTERN
tests/**/*.ts
diff --git a/buildspec.yml b/buildspec.yml
index 27dd166..89bf22c 100644
--- a/buildspec.yml
+++ b/buildspec.yml
@@ -11,7 +11,6 @@ phases:
commands:
- echo Build started on `date`
- npm run build
- - npm prune --omit=dev
post_build:
commands:
- echo Build completed on `date`
@@ -20,6 +19,5 @@ artifacts:
files:
- '.ebextensions/**/*'
- 'dist/**/*'
- - 'node_modules/**/*'
- 'package.json'
- 'package-lock.json'
diff --git a/client/.eslintrc.cjs b/client/.eslintrc.cjs
index 5d57390..9735d61 100644
--- a/client/.eslintrc.cjs
+++ b/client/.eslintrc.cjs
@@ -20,6 +20,7 @@ module.exports = {
parser: '@typescript-eslint/parser'
},
rules: {
+ '@typescript-eslint/consistent-type-imports': ['error'],
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/no-unsafe-assignment': ['off'],
'vue/multi-word-component-names': ['off'],
diff --git a/client/src/components/lobby/Options.vue b/client/src/components/lobby/Options.vue
index 0ef5129..37b168a 100644
--- a/client/src/components/lobby/Options.vue
+++ b/client/src/components/lobby/Options.vue
@@ -121,20 +121,11 @@ import { useGameStore } from '@/stores/game.js';
import { mapState } from 'pinia';
import { defineComponent } from 'vue';
-type Options = {
- promptTimer: number;
- numRounds: number;
- autoNumRounds: boolean;
- promptSkipping: boolean;
- sikeDispute: boolean;
- sikeRetries: number;
- packs: Record;
- customPrompts: string;
-};
+import type { SettableOptions } from ':common/options';
type NumericKeyOfOptions = {
- [K in keyof Options]: Options[K] extends number ? K : never;
-}[keyof Options];
+ [K in keyof SettableOptions]: SettableOptions[K] extends number ? K : never;
+}[keyof SettableOptions];
export default defineComponent({
props: {
@@ -167,14 +158,14 @@ export default defineComponent({
onNumRoundChange(event: Event) {
this.onNumChange(event, 'numRounds', { autoNumRounds: false });
},
- onNumChange(event: Event, label: NumericKeyOfOptions, options?: Partial) {
+ onNumChange(event: Event, label: NumericKeyOfOptions, options?: Partial) {
const inputValue = parseInt((event.currentTarget! as HTMLInputElement).value);
const actualValue = this.options[label];
if (Math.abs(inputValue - actualValue) !== 0) {
this.validateNum(event, label, options);
}
},
- validateNum(event: Event, label: NumericKeyOfOptions, options?: Partial) {
+ validateNum(event: Event, label: NumericKeyOfOptions, options?: Partial) {
const input = event.currentTarget! as HTMLInputElement;
const inputValue = parseInt(input.value);
const max = parseInt(input.max);
@@ -197,7 +188,7 @@ export default defineComponent({
},
validateSikeDispute(event: Event) {
const input = event.currentTarget! as HTMLInputElement;
- const options: Partial = {};
+ const options: Partial = {};
options.sikeDispute = input.checked;
if (!input.checked) {
options.sikeRetries = 0;
diff --git a/client/src/components/lobby/PlayerCard.vue b/client/src/components/lobby/PlayerCard.vue
index c8764ec..4352212 100644
--- a/client/src/components/lobby/PlayerCard.vue
+++ b/client/src/components/lobby/PlayerCard.vue
@@ -5,12 +5,9 @@