Skip to content

Commit

Permalink
Add prettier CI step, fix one-off LemmyHttp declarations (aeharding#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding authored Jul 1, 2023
1 parent 5f82acd commit 1724651
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- name: 📝 Lint
run: yarn lint

- name: 📝 Prettier formatting
run: yarn lint:formatting

- name: 💪 Type check
run: yarn test:typecheck
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"ionic.ionic"
]
"recommendations": ["ionic.ionic"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"preview": "vite preview",
"test": "vitest",
"test:typecheck": "tsc",
"lint": "eslint src --max-warnings=0"
"lint": "eslint src --max-warnings=0",
"lint:formatting": "prettier --check ."
},
"dependencies": {
"express": "^4.18.2",
Expand Down
3 changes: 1 addition & 2 deletions src/features/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
import styled from "@emotion/styled";
import { useAppDispatch } from "../../store";
import { login } from "./authSlice";
import { LemmyHttp } from "lemmy-js-client";
import { getClient } from "../../services/lemmy";
import { IonInputCustomEvent } from "@ionic/core";
import TermsSheet from "../settings/terms/TermsSheet";
Expand Down Expand Up @@ -162,7 +161,7 @@ export default function Login({
try {
await dispatch(
login(
new LemmyHttp(`/api/${server ?? customServerHostname}`),
getClient(server ?? customServerHostname),
username,
password,
totp
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/authSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const getSite =

const { iss } = jwtPayload;

const details = await new LemmyHttp(`/api/${iss}`).getSite({
const details = await getClient(iss).getSite({
auth: jwtSelector(getState()),
});

Expand Down
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ ion-modal.small ion-header ion-toolbar:first-of-type {

ion-alert.preserve-newlines {
white-space: pre-line;
}
}

0 comments on commit 1724651

Please sign in to comment.