Skip to content

Commit

Permalink
[Closes #437] Attempt to fix intermittent prettier issues (#438)
Browse files Browse the repository at this point in the history
* add debugging statement to debug prettier issues

* merge prettier config files

* try to align prettier settings b/t 2.x and 3.x

* install prettier 3.3.3, latest version

* run prettier to catch discrepancies b/t v2 and v3
  • Loading branch information
nickvisut authored Oct 15, 2024
1 parent 3e31369 commit 962b1f3
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 60 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
- name: Install dependencies
run: npm i --ci
- name: Run format:check
run: npm run format:check
run: |
npm run format:version
npm run format:check
- name: Run lint
run: npm run lint

Expand Down
6 changes: 5 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5"
}
57 changes: 9 additions & 48 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"postinstall": "next build --no-lint && nsm build --skip-build --only-api-files && npm run type-css",
"format": "prettier --write --ignore-unknown .",
"format:check": "prettier --check --ignore-unknown .",
"format:version": "prettier --version",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"all:check": "npm run type:check && npm run type-css:check && npm run lint && npm run format:check && npm run test",
Expand Down Expand Up @@ -93,7 +94,7 @@
"lint-staged": "^13.1.0",
"nextjs-server-modules": "^4.7.0",
"nodemailer-mock": "^2.0.1",
"prettier": "^2.8.8",
"prettier": "^3.3.3",
"rewiremock": "^3.14.5",
"storybook": "^8.1.11",
"testcontainers": "^9.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/backend/scripts/run-with-gcp-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const runWithGcpMetadata = async () => {
const [projectId, regionPath, { access_token }]: [
string,
string,
{ access_token: string }
{ access_token: string },
] = await Promise.all([
gcpMetadata.project("project-id"),
gcpMetadata.instance("region"),
Expand Down
3 changes: 2 additions & 1 deletion src/components/design_system/button/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}

.default:hover {
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3),
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.3),
0px 1px 3px 1px rgba(0, 0, 0, 0.15);
background-color: var(--primary-50);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ interface EnhancedTableProps<Person, Column> {
*/
export default function EnhancedTable<
Person extends StudentWithIep | Para,
Column extends HeadCell
Column extends HeadCell,
>({ people, onSubmit, headCells, type }: EnhancedTableProps<Person, Column>) {
const router = useRouter();

Expand Down
8 changes: 4 additions & 4 deletions src/components/taskCard/taskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ const TaskCard = ({ task, isPara }: TaskCardProps) => {
{!task.seen
? "NEW"
: completionRate >= 100
? "DONE"
: `DUE: ${
task.due_date ? format(task.due_date, "MM-dd-yyyy") : "N/A"
}`}
? "DONE"
: `DUE: ${
task.due_date ? format(task.due_date, "MM-dd-yyyy") : "N/A"
}`}
</div>
<div className={$taskCard.profile}>
{task.first_name} {task.last_name}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/benchmarks/[benchmark_id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ const BenchmarkPage = () => {
{hasInputChanged || updateTrialMutation.isLoading
? "Saving..."
: updateTrialMutation.isError
? "uh oh"
: "Saved to Cloud"}
? "uh oh"
: "Saved to Cloud"}
</div>

<Grid container spacing={2}>
Expand Down

0 comments on commit 962b1f3

Please sign in to comment.