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
27 changes: 0 additions & 27 deletions .eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions client/.eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions client/.eslintrc.cjs

This file was deleted.

50 changes: 50 additions & 0 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* eslint-env node */
import globals from 'globals';
import path from 'path';
import { fileURLToPath } from 'url';
import rootConfig from '../eslint.config.js';
import tsEslintParser from '@typescript-eslint/parser';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootConfig,
{
// Note: there should be no other properties in this object
ignores: ['src/server-types.d.ts', 'eslint.config.js', 'postcss.config.js'],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: { ...globals.browser },
parser: tsEslintParser,
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
},
plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh },
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@sentry/react',
message: '@sentry/react should only be lazy imported',
},
],
},
],
},
},
];
36 changes: 18 additions & 18 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
"typecheck": "pnpm exec tsc --build"
},
"dependencies": {
"@sentry/react": "^8.25.0",
"@sentry/vite-plugin": "^2.22.0",
"@tanstack/react-query": "^5.50.1",
"@sentry/react": "^9.16.1",
"@sentry/vite-plugin": "^3.4.0",
"@tanstack/react-query": "^5.75.5",
"classnames": "^2.5.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"jsdom": "^24.1.0",
"postcss": "^8.4.39",
"tailwindcss": "^3.4.4",
"vite": "^5.3.2",
"vitest": "^2.0.2"
"@tailwindcss/postcss": "^4.1.5",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"@vitejs/plugin-react-swc": "^3.9.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"jsdom": "^26.1.0",
"postcss": "^8.5.3",
"tailwindcss": "^4.1.5",
"vite": "^6.3.5",
"vitest": "^3.1.3"
}
}
3 changes: 1 addition & 2 deletions client/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
'@tailwindcss/postcss': {},
},
};
10 changes: 6 additions & 4 deletions client/src/components/ui.modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ export const Modal = ({
return (
<div
className={classNames(
'fixed inset-0 bg-black bg-opacity-70 flex justify-center items-center z-50',
isOpen ? 'animate-fadeIn' : 'animate-fadeOut',
'fixed inset-0 bg-black/70 flex justify-center items-center',
isOpen ? 'animate-(--animate-fade-in)' : 'animate-(--animate-fade-out)',
)}
onClick={onClose}
onAnimationEnd={handleAnimationEnd}
>
<div
className={classNames(
'rounded-lg p-6 m-4',
isOpen ? 'animate-scaleIn' : 'animate-scaleOut',
'relative rounded-lg p-6 m-4',
isOpen
? 'animate-(--animate-scale-in)'
: 'animate-(--animate-scale-out)',
className ?? '',
)}
onClick={(e) => e.stopPropagation()}
Expand Down
4 changes: 2 additions & 2 deletions client/src/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const useServerOkQuery = () => {
if (!res.ok) {
throw res;
}
return res.json();
return res.text();
})
.catch((error) => {
captureException(error);
return null;
throw error;
});
},
});
Expand Down
68 changes: 65 additions & 3 deletions client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import 'tailwindcss';

@theme {
--animate-fade-in: fadeIn 0.3s ease-out forwards;
--animate-fade-out: fadeOut 0.3s ease-out forwards;
--animate-scale-in: scaleIn 0.3s ease-out forwards;
--animate-scale-out: scaleOut 0.3s ease-out forwards;

--font-sans: Ubuntu, sans-serif;

@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes scaleIn {
0% {
transform: scale(0.95);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes scaleOut {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.95);
opacity: 0;
}
}
}

/*
The default border color has changed to `currentcolor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.

If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentcolor);
}
}

@layer base {
html {
Expand Down
35 changes: 0 additions & 35 deletions client/tailwind.config.ts

This file was deleted.

1 change: 0 additions & 1 deletion e2e/.eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions e2e/.eslintrc.cjs

This file was deleted.

30 changes: 30 additions & 0 deletions e2e/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint-env node */
import path from 'path';
import { fileURLToPath } from 'url';
import globals from 'globals';
import rootConfig from '../eslint.config.js';
import tsEslintParser from '@typescript-eslint/parser';

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootConfig,
{
// Note: there should be no other properties in this object
ignores: ['eslint.config.js'],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: { ...globals.browser },
parser: tsEslintParser,
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
},
},
];
9 changes: 9 additions & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@create-react-spa-cloudflare/e2e",
"type": "module",
"version": "0.0.0",
"scripts": {
"lint": "eslint .",
"typecheck": "pnpm exec tsc --build"
}
}
Loading