chore: update project dependencies and configuration
- Migrated ESLint configuration from Next.js to SolidJS - Removed React-specific ESLint plugins - Updated Turbo configuration with global dependencies - Simplified Prisma scripts in API package - Added shared ESLint and TypeScript configs to web and API packages - Cleaned up unnecessary dependencies and configurations
This commit is contained in:
parent
19bb0b5bdf
commit
a3700a0068
16 changed files with 130 additions and 1948 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -33,6 +33,9 @@ npm-debug.log*
|
|||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib"
|
||||
}
|
|
@ -10,9 +10,9 @@
|
|||
"test": "ts-node --test test/**/*.test.ts",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "nodemon --delay 2000ms src/index.ts",
|
||||
"prisma:generate": "dotenv -e ../../.env -- prisma generate",
|
||||
"prisma:migrate": "dotenv -e ../../.env -- prisma migrate dev",
|
||||
"prisma:init": "dotenv -e ../../.env -- prisma migrate dev --name init",
|
||||
"prisma:generate": "prisma generate",
|
||||
"prisma:migrate": "prisma migrate dev",
|
||||
"prisma:init": "prisma migrate dev --name init",
|
||||
"build": "tsc"
|
||||
},
|
||||
"keywords": [],
|
||||
|
@ -33,6 +33,7 @@
|
|||
"devDependencies": {
|
||||
"@repo/eslint-config": "*",
|
||||
"@repo/typescript-config": "*",
|
||||
"typescript": "5.8.2",
|
||||
"prisma": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/eslint-config": "*",
|
||||
"@repo/typescript-config": "*",
|
||||
"typescript": "5.8.2",
|
||||
"vite": "^6.2.0",
|
||||
"vite-plugin-solid": "^2.11.2"
|
||||
|
|
1988
package-lock.json
generated
1988
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,6 @@
|
|||
import js from '@eslint/js';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
import turboPlugin from 'eslint-plugin-turbo';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import onlyWarn from 'eslint-plugin-only-warn';
|
||||
|
||||
/**
|
||||
* A shared ESLint configuration for the repository.
|
||||
|
@ -11,7 +9,6 @@ import onlyWarn from 'eslint-plugin-only-warn';
|
|||
* */
|
||||
export const config = [
|
||||
js.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
plugins: {
|
||||
|
@ -21,11 +18,6 @@ export const config = [
|
|||
'turbo/no-undeclared-env-vars': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
onlyWarn,
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['dist/**'],
|
||||
},
|
||||
|
|
|
@ -9,14 +9,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@next/eslint-plugin-next": "^15.2.1",
|
||||
"@typescript-eslint/parser": "^8.26.0",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-prettier": "^10.0.2",
|
||||
"eslint-plugin-only-warn": "^1.1.0",
|
||||
"eslint-plugin-react": "^7.37.4",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-solid": "^0.14.5",
|
||||
"eslint-plugin-turbo": "^2.4.4",
|
||||
"globals": "^16.0.0",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript-eslint": "^8.26.0"
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import js from '@eslint/js';
|
||||
import solid from 'eslint-plugin-solid/configs/typescript';
|
||||
import * as tsParser from '@typescript-eslint/parser';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
import { config as baseConfig } from './base.js';
|
||||
|
||||
/**
|
||||
|
@ -11,7 +10,6 @@ import { config as baseConfig } from './base.js';
|
|||
export const config = [
|
||||
...baseConfig,
|
||||
js.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
...solid,
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
"compilerOptions": {
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "solid-js"
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"use client";
|
||||
'use client';
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { JSX } from 'solid-js/jsx-runtime';
|
||||
|
||||
interface ButtonProps {
|
||||
children: ReactNode;
|
||||
children: JSX.Element;
|
||||
className?: string;
|
||||
appName: string;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ interface ButtonProps {
|
|||
export const Button = ({ children, className, appName }: ButtonProps) => {
|
||||
return (
|
||||
<button
|
||||
className={className}
|
||||
class={className}
|
||||
onClick={() => alert(`Hello from your ${appName} app!`)}
|
||||
>
|
||||
{children}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { type JSX } from "react";
|
||||
import { type JSX } from 'solid-js/jsx-runtime';
|
||||
|
||||
export function Card({
|
||||
className,
|
||||
|
@ -8,15 +8,15 @@ export function Card({
|
|||
}: {
|
||||
className?: string;
|
||||
title: string;
|
||||
children: React.ReactNode;
|
||||
children: JSX.Element;
|
||||
href: string;
|
||||
}): JSX.Element {
|
||||
return (
|
||||
<a
|
||||
className={className}
|
||||
class={className}
|
||||
href={`${href}?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"`}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>
|
||||
<h2>
|
||||
{title} <span>-></span>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { type JSX } from "react";
|
||||
import { type JSX } from 'solid-js/jsx-runtime';
|
||||
|
||||
export function Code({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
children: JSX.Element;
|
||||
className?: string;
|
||||
}): JSX.Element {
|
||||
return <code className={className}>{children}</code>;
|
||||
return <code class={className}>{children}</code>;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,5 @@
|
|||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
import type { PlopTypes } from "@turbo/gen";
|
||||
import type { PlopTypes } from '@turbo/gen';
|
||||
|
||||
// Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation
|
||||
|
||||
export default function generator(plop: PlopTypes.NodePlopAPI): void {
|
||||
// A simple generator to add a new React component to the internal UI library
|
||||
plop.setGenerator("react-component", {
|
||||
description: "Adds a new react component",
|
||||
plop.setGenerator('solid-component', {
|
||||
description: 'Adds a new solid component',
|
||||
prompts: [
|
||||
{
|
||||
type: "input",
|
||||
name: "name",
|
||||
message: "What is the name of the component?",
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'What is the name of the component?',
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
type: "add",
|
||||
path: "src/{{kebabCase name}}.tsx",
|
||||
templateFile: "templates/component.hbs",
|
||||
type: 'add',
|
||||
path: 'src/{{kebabCase name}}.tsx',
|
||||
templateFile: 'templates/component.hbs',
|
||||
},
|
||||
{
|
||||
type: "append",
|
||||
path: "package.json",
|
||||
type: 'append',
|
||||
path: 'package.json',
|
||||
pattern: /"exports": {(?<insertion>)/g,
|
||||
template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",',
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const {{ pascalCase name }} = ({ children }: { children: React.ReactNode }) => {
|
||||
export const {{ pascalCase name }} = ({ children }: { children: JSX.Element }) => {
|
||||
return (
|
||||
<div>
|
||||
<h1>{{ pascalCase name }} Component</h1>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"ui": "tui",
|
||||
"globalDependencies": [".env"],
|
||||
"globalEnv": ["NODE_ENV", "DATABASE_URL", "VITE_API_URL", "VITE_WS_URL"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||
"inputs": [".env*"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"lint": {
|
||||
|
|
Loading…
Add table
Reference in a new issue