diff --git a/backend/.eslintignore b/backend/.eslintignore index 0e20585..5f933a1 100644 --- a/backend/.eslintignore +++ b/backend/.eslintignore @@ -2,3 +2,4 @@ /node_modules/* /dist/* /tests/* +/jest.config.js diff --git a/backend/.eslintrc.json b/backend/.eslintrc.json index 126c2d5..f3b3648 100644 --- a/backend/.eslintrc.json +++ b/backend/.eslintrc.json @@ -12,7 +12,6 @@ "plugins": ["@typescript-eslint"], "rules": { "indent": ["error", 4], - "linebreak-style": ["error", "unix"], "quotes": ["error", "single"], "semi": ["error", "always"] } diff --git a/backend/.prettierrc b/backend/.prettierrc index fe1af8e..25b37d2 100644 --- a/backend/.prettierrc +++ b/backend/.prettierrc @@ -2,6 +2,5 @@ "singleQuote": true, "trailingComma": "es5", "tabWidth": 4, - "semi": true, - "endOfLine": "lf" + "semi": true } diff --git a/backend/jest.config.js b/backend/jest.config.js index 3b3d440..7e1c851 100644 --- a/backend/jest.config.js +++ b/backend/jest.config.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ module.exports = { transform: { '^.+\\.d?ts?$': 'ts-jest' }, testEnvironment: 'node', diff --git a/backend/uno-game-engine/deck.ts b/backend/uno-game-engine/deck.ts index 065c25d..6a455db 100644 --- a/backend/uno-game-engine/deck.ts +++ b/backend/uno-game-engine/deck.ts @@ -66,6 +66,7 @@ export function makeCard( if (!sameCardCount[id]) sameCardCount[id] = 0; sameCardCount[id]++; // increment the count of same cards to assign unique id + const uid = `${id}-${sameCardCount[id]}`; return { type, color, value, id: uid }; }