Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: true
matrix:
script: [format, lint]
script: ["format", "lint", "typecheck:ci"]

steps:
- name: Checkout repo
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"now-build": "pnpm run build",
"start": "next start",
"typecheck": "tsc --noEmit",
"typecheck:ci": "next build --no-lint && tsc --noEmit",
"prepare": "husky install"
},
"lint-staged": {
Expand Down
7 changes: 4 additions & 3 deletions src/components/BuilderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Animate } from "react-simple-animate"
import { useForm } from "react-hook-form"
import SortableContainer from "./SortableContainer"
import { useStateMachine } from "little-state-machine"
import type { GlobalState } from "little-state-machine"
import colors from "../styles/colors"
import generateCode from "./logic/generateCode"
import copyClipBoard from "./utils/copyClipBoard"
Expand Down Expand Up @@ -65,7 +66,7 @@ function BuilderPage({
useForm()
const errors = formState.errors
const [editIndex, setEditIndex] = useState(-1)
const copyFormData = useRef([])
const copyFormData = useRef<GlobalState["formData"]>([])
const closeButton = useRef<HTMLButtonElement>(null)
const [showValidation, toggleValidation] = useState(false)
const onSubmit = (data) => {
Expand All @@ -90,7 +91,7 @@ function BuilderPage({
editFormData.minLength ||
editFormData.required
copyFormData.current = formData
const editIndexRef = useRef(null)
const editIndexRef = useRef<number | null>(null)
editIndexRef.current = editIndex
const router = useRouter()

Expand Down Expand Up @@ -440,7 +441,7 @@ function BuilderPage({
aria-label="close builder"
ref={closeButton}
onClick={() => {
toggleBuilder(false)
toggleBuilder?.(false)
goToBuilder(false)
}}
>
Expand Down
3 changes: 1 addition & 2 deletions src/components/mdx/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-expect-error currently not being exported https://github.com/FormidableLabs/prism-react-renderer/issues/206
import { PrismTheme } from "prism-react-renderer"
import type { PrismTheme } from "prism-react-renderer"

export const theme: PrismTheme = {
plain: {
Expand Down
Loading