Skip to content

Commit

Permalink
More eslint, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
visnup committed Jan 24, 2024
1 parent 35a5285 commit 7606fb6
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"extends": "next/core-web-vitals"
"extends": ["next/core-web-vitals", "prettier"],
"plugins": ["import", "prettier"],
"rules": {
"import/order": "error",
"prettier/prettier": "error"
}
}
2 changes: 1 addition & 1 deletion convex/deals.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { v } from "convex/values";
import { mutation, query } from "./_generated/server.js";
import { shuffle } from "d3-array";
import { mutation, query } from "./_generated/server.js";

const suits = [..."♣♦♥♠"];
const ranks = [..."23456789", "10", ..."JQKA"];
Expand Down
2 changes: 1 addition & 1 deletion convex/players.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mutation } from "./_generated/server.js";
import { v } from "convex/values";
import { mutation } from "./_generated/server.js";

export const join = mutation({
args: { table: v.string() },
Expand Down
2 changes: 1 addition & 1 deletion convex/schema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineSchema, defineTable} from "convex/server";
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";

export default defineSchema({
Expand Down
93 changes: 92 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"@types/react-transition-group": "^4.4.10",
"eslint": "^8.56.0",
"eslint-config-next": "^14.1.0",
"prettier": "^3.2.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"typescript": "^5.3.3"
}
}
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export function Card({
}: CardProps & JSX.IntrinsicElements["div"]) {
const r = useMemo(
() => (void card, rotation ?? Math.random() * 10 - 5),
[rotation, card]
[rotation, card],
);
const upsideDown = useMemo(() => (void card, Math.random() > 0.5), [card]);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Hand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Head from "next/head";
import { useEffect, useState } from "react";
import { animated, config, useSpring } from "react-spring";
import { useQuery } from "convex/react";
import { Card } from "./Card";
import { api } from "../../convex/_generated/api";
import { Card } from "./Card";

const slow = { ...config.slow, precision: 0.0001 };
export function Hand({ table, seat }: { table: string; seat: number }) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Head from "next/head";
import { ReactNode, useState } from "react";
import { animated, useSpring } from "react-spring";
import { useMutation, useQuery } from "convex/react";
import { Card } from "./Card";
import { api } from "../../convex/_generated/api";
import { Card } from "./Card";

function DealerButton({
onMove,
Expand Down Expand Up @@ -36,7 +36,7 @@ function DealerButton({
});
if (last && Math.hypot(...movement) > 200) onMove();
return memo;
}
},
);

return (
Expand Down

1 comment on commit 7606fb6

@vercel
Copy link

@vercel vercel bot commented on 7606fb6 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

poker – ./

poker-git-main-visnup.vercel.app
poker-visnup.vercel.app
poker.dance

Please sign in to comment.