Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update prettier config, run format #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
build
public/static
node_modules
*.yml
*.yml
sanity-dauci/dist/*
sanity-dauci/node_modules/*
sanity-dauci/.sanity/*
23 changes: 21 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
{
"useTabs": true,
"tabWidth": 4,
"useTabs": true,
"printWidth": 80,
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: I think many previous lines were formatted at print width around 88 which does help prevent some overly compact lines.

"semi": true,
"singleQuote": false,
"printWidth": 80
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
Copy link
Member

Choose a reason for hiding this comment

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

Question: is there a particular reason you chose a plugin for Prettier rather than something like eslint-plugin-import which is included in eslint-config-react-app?

"importOrder": [
"^(react/(.*)$)|^(react$)",
"^(next/(.*)$)|^(next$)",
"<THIRD_PARTY_MODULES>",
"",
"^types$",
"^~/types/(.*)$",
"^~/config/(.*)$",
"^~/lib/(.*)$",
"^~/hooks/(.*)$",
"^~/components/ui/(.*)$",
"^~/components/(.*)$",
"^~/styles/(.*)$",
"^~/app/(.*)$",
Comment on lines +14 to +21
Copy link
Member

Choose a reason for hiding this comment

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

Issue: I don't think these particular imports fit the folder structure of our site.

"",
"^[./]"
],
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ Currently, the final build size is about 50kb which isn't nearly big enough to w

### Immediate improvements to be made

- i18n?
- a11y - mouse hover interaction (fields - text, buttons - pointer), semantic html (text component for example should be switched to various h tags)
- pagination for events list
- A lot of styling still needs to be refactored
- i18n?
- a11y - mouse hover interaction (fields - text, buttons - pointer), semantic html (text component for example should be switched to various h tags)
- pagination for events list
- A lot of styling still needs to be refactored

### Later planned updates:

Expand Down
5 changes: 4 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@

<title>Design at UCI</title>

<link href="https://fonts.googleapis.com/css2?family=Gluten:[email protected]&display=swap" rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=Gluten:[email protected]&display=swap"
rel="stylesheet"
/>

<link
rel="preload"
Expand Down
10 changes: 5 additions & 5 deletions sanity-dauci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Congratulations, you have now installed the Sanity Content Studio, an open-sourc

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- Check out the example frontend: [React/Next.js](https://github.com/sanity-io/tutorial-sanity-blog-react-next)
- [Read the blog post about this template](https://www.sanity.io/blog/build-your-own-blog-with-sanity-and-next-js?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- Check out the example frontend: [React/Next.js](https://github.com/sanity-io/tutorial-sanity-blog-react-next)
- [Read the blog post about this template](https://www.sanity.io/blog/build-your-own-blog-with-sanity-and-next-js?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
6 changes: 3 additions & 3 deletions sanity-dauci/components/SelectWithCustomInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect, FormEvent } from "react";
import { TextInput, Stack, Select, Card } from "@sanity/ui";
import { set, unset, StringInputProps, StringSchemaType } from "sanity";
import React, { FormEvent, useEffect, useState } from "react";
import { Card, Select, Stack, TextInput } from "@sanity/ui";
import { set, StringInputProps, StringSchemaType, unset } from "sanity";

export const SelectWithCustomInput = React.forwardRef(
function SelectWithCustomInput(
Expand Down
Loading