Skip to content

Commit b9f191a

Browse files
authored
๐ŸŽฎ playground Setup (#88)
2 parents 443e61e + b908f28 commit b9f191a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1035
-6
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import baseConfig, { restrictEnvAccess } from "@swy/eslint-config/base";
2+
import nextjsConfig from "@swy/eslint-config/nextjs";
3+
import reactConfig from "@swy/eslint-config/react";
4+
5+
/** @type {import('typescript-eslint').Config} */
6+
export default [
7+
{
8+
ignores: [".next/**"],
9+
},
10+
...baseConfig,
11+
...reactConfig,
12+
...nextjsConfig,
13+
...restrictEnvAccess,
14+
];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { fileURLToPath } from "url";
2+
import { createJiti } from "jiti";
3+
4+
// Import env files to validate at build time. Use jiti so we can load .ts files in here.
5+
await createJiti(fileURLToPath(import.meta.url))("./src/env");
6+
7+
/** @type {import("next").NextConfig} */
8+
const config = {
9+
reactStrictMode: true,
10+
11+
/** Enables hot reloading for local packages without a build step */
12+
transpilePackages: [
13+
"@swy/liveblocks",
14+
"@swy/notion",
15+
"@swy/ui",
16+
"@swy/validators",
17+
"lucide-react",
18+
],
19+
experimental: {
20+
optimizePackageImports: ["lucide-react"],
21+
},
22+
23+
/** We already do linting and typechecking as separate tasks in CI */
24+
eslint: { ignoreDuringBuilds: true },
25+
typescript: { ignoreBuildErrors: true },
26+
/** */
27+
images: {
28+
remotePatterns: [
29+
{
30+
protocol: "https",
31+
hostname: "img.clerk.com",
32+
},
33+
{
34+
protocol: "https",
35+
hostname: "images.unsplash.com",
36+
},
37+
{
38+
protocol: "https",
39+
hostname: "files.edgestore.dev",
40+
},
41+
{
42+
protocol: "https",
43+
hostname: "www.notion.so",
44+
},
45+
{
46+
protocol: "https",
47+
hostname: "upload.wikimedia.org",
48+
},
49+
{
50+
protocol: "https",
51+
hostname: "avatars.githubusercontent.com",
52+
},
53+
],
54+
},
55+
};
56+
57+
export default config;
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "@swy/playground",
3+
"version": "1.4.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"build": "pnpm with-env next build",
8+
"clean": "git clean -xdf .next .turbo node_modules",
9+
"dev": "pnpm with-env next dev -p 3002",
10+
"format": "prettier --check . --ignore-path ../../.gitignore",
11+
"lint": "eslint",
12+
"start": "pnpm with-env next start",
13+
"typecheck": "tsc --noEmit",
14+
"with-env": "dotenv -e ../../.env --"
15+
},
16+
"dependencies": {
17+
"@swy/i18n": "workspace:*",
18+
"@swy/liveblocks": "workspace:*",
19+
"@swy/notion": "workspace:*",
20+
"@swy/ui": "workspace:*",
21+
"@swy/validators": "workspace:*",
22+
"@t3-oss/env-nextjs": "catalog:env",
23+
"lucide-react": "catalog:ui",
24+
"next": "catalog:next14",
25+
"react": "catalog:react18",
26+
"react-dom": "catalog:react18",
27+
"react-textarea-autosize": "^8.5.3",
28+
"sonner": "catalog:ui",
29+
"swr": "^2.2.5",
30+
"yjs": "^13.6.15",
31+
"zod": "catalog:"
32+
},
33+
"devDependencies": {
34+
"@swy/eslint-config": "workspace:*",
35+
"@swy/prettier-config": "workspace:*",
36+
"@swy/tailwind-config": "workspace:*",
37+
"@swy/tsconfig": "workspace:*",
38+
"@types/node": "catalog:node20",
39+
"@types/react": "catalog:react18",
40+
"@types/react-dom": "catalog:react18",
41+
"dotenv-cli": "catalog:env",
42+
"eslint": "catalog:",
43+
"jiti": "^2.4.0",
44+
"prettier": "catalog:",
45+
"tailwindcss": "catalog:",
46+
"typescript": "catalog:"
47+
},
48+
"prettier": "@swy/prettier-config"
49+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
},
5+
};
60.9 KB
Loading
67.5 KB
Loading
50.8 KB
Loading
50.8 KB
Loading
48 KB
Loading

0 commit comments

Comments
ย (0)