Compare commits

...

2 commits

Author SHA1 Message Date
28279942ad chore: update CI workflow to include linting and type-checking
Some checks failed
CI / test (push) Failing after 4s
- Added linting step to ensure code quality.
- Included type-checking step to verify TypeScript types.
2025-05-06 00:35:44 -05:00
7d4796c8eb chore: update package.json and TypeScript configuration across multiple packages
- Added linting and type-checking scripts to package.json for api, web, and ui packages.
- Updated ESLint configuration to ignore specific directories and added global window variable.
- Modified TypeScript configuration for ui package to exclude turbo generators.
- Refactored Button, Card, and Code components to use props for better readability and consistency.
2025-05-06 00:35:39 -05:00
9 changed files with 26 additions and 24 deletions

View file

@ -6,7 +6,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Status
run: git status
- name: Host
run: cat /etc/hosts
- name: Lint
run: npm run lint
- name: Check Types
run: npm run check-types

View file

@ -7,6 +7,8 @@
"test": "test"
},
"scripts": {
"lint": "eslint . --max-warnings 0",
"check-types": "tsc --noEmit",
"test": "ts-node --test test/**/*.test.ts",
"start": "node dist/index.js",
"dev": "nodemon --delay 2000ms src/index.ts",

View file

@ -4,6 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"lint": "eslint . --max-warnings 0",
"check-types": "tsc --noEmit",
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"

View file

@ -13,11 +13,15 @@ export const config = [
{
files: ['**/*.{ts,tsx}'],
...solid,
ignores: ['turbo/generators/**'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: 'tsconfig.json',
},
globals: {
window: true,
},
},
},
];

View file

@ -5,6 +5,7 @@
"exports": {
"./*": "./src/*.tsx"
},
"type": "module",
"scripts": {
"lint": "eslint . --max-warnings 0",
"generate:component": "turbo gen react-component",

View file

@ -8,13 +8,13 @@ interface ButtonProps {
appName: string;
}
export const Button = ({ children, className, appName }: ButtonProps) => {
export const Button = (props: ButtonProps) => {
return (
<button
class={className}
onClick={() => alert(`Hello from your ${appName} app!`)}
class={props.className}
onClick={() => window.alert(`Hello from your ${props.appName} app!`)}
>
{children}
{props.children}
</button>
);
};

View file

@ -1,11 +1,6 @@
import { type JSX } from 'solid-js/jsx-runtime';
export function Card({
className,
title,
children,
href,
}: {
export function Card(props: {
className?: string;
title: string;
children: JSX.Element;
@ -13,15 +8,15 @@ export function Card({
}): JSX.Element {
return (
<a
class={className}
href={`${href}?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"`}
class={props.className}
href={`${props.href}?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"`}
rel='noopener noreferrer'
target='_blank'
>
<h2>
{title} <span>-&gt;</span>
{props.title} <span>-&gt;</span>
</h2>
<p>{children}</p>
<p>{props.children}</p>
</a>
);
}

View file

@ -1,11 +1,8 @@
import { type JSX } from 'solid-js/jsx-runtime';
export function Code({
children,
className,
}: {
export function Code(props: {
children: JSX.Element;
className?: string;
}): JSX.Element {
return <code class={className}>{children}</code>;
return <code class={props.className}>{props.children}</code>;
}

View file

@ -3,5 +3,6 @@
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"]
"include": ["src"],
"exclude": ["turbo/generators"]
}