Skip to content

Commit

Permalink
feat: updates prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
malcodeman committed Sep 30, 2024
1 parent acd3f3b commit 9f3643e
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-tailwindcss"]
}
4 changes: 2 additions & 2 deletions app/_components/Posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function Posts(props: Props) {
map((item) => {
const gallery = map(
(item) => item.s.u,
values(item.data.media_metadata || {})
values(item.data.media_metadata || {}),
);

return (
Expand All @@ -68,7 +68,7 @@ export default function Posts(props: Props) {
/>
);
}, item.children),
pages
pages,
)}
<div ref={elementRef} />
</main>
Expand Down
2 changes: 1 addition & 1 deletion app/_components/TimePopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function TimePopover() {
</Link>
</MenuItem>
),
TIME
TIME,
)}
</MenuList>
</Menu>
Expand Down
4 changes: 2 additions & 2 deletions app/_hooks/usePosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getSubreddit = async (props: { pageParam: SubredditPageParam }) => {
after: pageParam.after,
raw_json: 1,
},
}
},
);
const data: JsonData = response.data;
const filtered = parsePosts(data.data.children);
Expand All @@ -59,7 +59,7 @@ const getUser = async (props: { pageParam: UserPageParam }) => {
after: pageParam.after,
raw_json: 1,
},
}
},
);
const data: JsonData = response.data;
const filtered = parsePosts(data.data.children);
Expand Down
2 changes: 1 addition & 1 deletion app/_lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ export const SUPPORTED_VIDEO_EXTENSIONS = [".mp4", ".gifv"];

export const SUPPORTED_FILE_EXTENSIONS = concat(
SUPPORTED_IMAGE_EXTENSIONS,
SUPPORTED_VIDEO_EXTENSIONS
SUPPORTED_VIDEO_EXTENSIONS,
);
4 changes: 2 additions & 2 deletions app/_lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const parsePosts = (posts: RedditPost[]) => {
(item) =>
includes(getExtension(item.data.url), SUPPORTED_FILE_EXTENSIONS) ||
equals(item.data.is_gallery, true),
posts
posts,
);
};

Expand All @@ -50,7 +50,7 @@ export const parseComments = (comments: RedditComment[]) => {
item.data.author !== "AutoModerator" &&
item.data.body !== "[removed]" &&
item.data.body !== "[deleted]",
comments
comments,
);
};

Expand Down
4 changes: 2 additions & 2 deletions app/r/[subreddit]/comments/[id]/[title]/_components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function Post() {
<Options url={item} filename={post.id} />
</div>
),
gallery
gallery,
)}
</div>
) : (
Expand Down Expand Up @@ -98,7 +98,7 @@ export default function Post() {
/>
</div>
),
comments
comments,
)}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Button = forwardRef(
</button>
);
}
}
},
);

Button.displayName = "Button";
2 changes: 1 addition & 1 deletion components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Input = forwardRef(
{...rest}
/>
);
}
},
);

Input.displayName = "Input";
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"eslint": "^8.38.0",
"eslint-config-next": "^13.3.0",
"postcss": "^8.4.21",
"prettier": "^2.8.7",
"prettier-plugin-tailwindcss": "^0.2.7",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"tailwindcss": "^3.3.1",
"typescript": "^5.3.3"
}
Expand Down
3 changes: 0 additions & 3 deletions prettier.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export type RedditComment = {

export type CommentTree = [
{ kind: string; data: { children: RedditPost[] } },
{ kind: string; data: { children: RedditComment[] } }
{ kind: string; data: { children: RedditComment[] } },
];

export type ErrorComponent = {
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3406,15 +3406,15 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier-plugin-tailwindcss@^0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.7.tgz#2314d728cce9c9699ced41a01253eb48b4218da5"
integrity sha512-jQopIOgjLpX+y8HeD56XZw7onupRTC0cw7eKKUimI7vhjkPF5/1ltW5LyqaPtSyc8HvEpvNZsvvsGFa2qpa59w==

prettier@^2.8.7:
version "2.8.7"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
prettier-plugin-tailwindcss@^0.6.8:
version "0.6.8"
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.8.tgz#8a178e1679e3f941cc9de396f109c6cffea676d8"
integrity sha512-dGu3kdm7SXPkiW4nzeWKCl3uoImdd5CTZEJGxyypEPL37Wj0HT2pLqjrvSei1nTeuQfO4PUfjeW5cTUNRLZ4sA==

prettier@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==

prop-types@^15.8.1:
version "15.8.1"
Expand Down

0 comments on commit 9f3643e

Please sign in to comment.