From 93e4c363c16c6b2b25df2510edd329df8aebb922 Mon Sep 17 00:00:00 2001 From: Kislay Date: Sat, 1 Jun 2024 01:49:41 +0530 Subject: [PATCH] eslint: Fix CRLF issues. Not checking for line endings at all. Also formatted all files using prettier. --- backend/.eslintignore | 1 + backend/.eslintrc.json | 1 - backend/.prettierrc | 2 +- backend/jest.config.js | 1 + backend/uno-game-engine/deck.ts | 6 +++++- 5 files changed, 8 insertions(+), 3 deletions(-) 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..a94e076 100644 --- a/backend/.prettierrc +++ b/backend/.prettierrc @@ -3,5 +3,5 @@ "trailingComma": "es5", "tabWidth": 4, "semi": true, - "endOfLine": "lf" + "endOfLine": "crlf" } 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 9e113f5..c25ebe0 100644 --- a/backend/uno-game-engine/deck.ts +++ b/backend/uno-game-engine/deck.ts @@ -55,7 +55,11 @@ export function getShuffledCardDeck(): Array { * Helper function to make a card object. * @returns {UNOCard} The composed UNO card. */ -export function makeCard(type: CardType, color: CardColor, value: CardValue): UNOCard { +export function makeCard( + type: CardType, + color: CardColor, + value: CardValue +): UNOCard { //todo: Implement unique identification of cards by assigning an id to each card return { type, color, value, id: undefined }; }