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

build: typecheck inertia code #29

Merged
merged 2 commits into from
Jan 7, 2025
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
1 change: 1 addition & 0 deletions website/inertia/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference path="../../adonisrc.ts" />
/// <reference path="../../config/inertia.ts" />
/// <reference path="../../config/auth.ts" />

import '../css/app.css'

Expand Down
2 changes: 0 additions & 2 deletions website/inertia/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

import { Link } from "@inertiajs/react";

/*
Expand Down
2 changes: 2 additions & 0 deletions website/inertia/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
...classNames,
}}
components={{
// @ts-ignore fixed in another branch
IconLeft: ({ className, ...props }) => (
<ChevronLeft className={cn('h-4 w-4', className)} {...props} />
),
// @ts-ignore fixed in another branch
IconRight: ({ className, ...props }) => (
<ChevronRight className={cn('h-4 w-4', className)} {...props} />
),
Expand Down
2 changes: 1 addition & 1 deletion website/inertia/layouts/applayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement } from "react";
import { ReactElement } from "react";
import { Head } from "@inertiajs/react";
import NavBar from "../components/navbar";

Expand Down
1 change: 0 additions & 1 deletion website/inertia/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import AppLayout from '../layouts/applayout'
import { TZDateMini } from '@date-fns/tz'
import { useCountdown } from '~/hooks/use_countdown'
import { TimeLeft } from '~/lib/countdown'
import { cn } from '~/lib/utils'

const utcTarget = new TZDateMini(
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --fix",
"lint": "eslint .",
"format": "prettier --write .",
"typecheck": "tsc --noEmit",
"typecheck": "tsc -p . -p ./inertia --noEmit",
"prepare": "sh -c './scripts/prepare.sh'"
},
"imports": {
Expand Down
3 changes: 3 additions & 0 deletions website/scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ fi
echo "Generating Tuyau types..."
node ace tuyau:generate

# Prepend "// @ts-nocheck" to .adonsjs/api.ts
sed -i '1s/^/\/\/ @ts-nocheck\n/' .adonisjs/api.ts

# Preparation is complete

echo "ENEI Website workspace is ready!"
Loading