create-apppaaaul 2.0.14 → 2.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/index.js +0 -4
  2. package/dist/index.js.map +1 -1
  3. package/dist/templates/nextjs-ts-clean/project/%%.gitignore +43 -0
  4. package/dist/templates/nextjs-ts-clean/project/eslint.config.mjs +137 -114
  5. package/dist/templates/nextjs-ts-clean/project/package.json +17 -15
  6. package/dist/templates/nextjs-ts-clean/project/src/scripts/dev-rebase.js +42 -0
  7. package/dist/templates/nextjs-ts-landing-prisma/project/%%.gitignore +46 -0
  8. package/dist/templates/nextjs-ts-landing-prisma/project/eslint.config.mjs +137 -114
  9. package/dist/templates/nextjs-ts-landing-prisma/project/package.json +21 -19
  10. package/dist/templates/nextjs-ts-landing-prisma/project/src/scripts/dev-rebase.js +42 -0
  11. package/package.json +1 -1
  12. package/dist/templates/nextjs-ts-landing-drizzle/project/README.md +0 -15
  13. package/dist/templates/nextjs-ts-landing-drizzle/project/components.json +0 -21
  14. package/dist/templates/nextjs-ts-landing-drizzle/project/drizzle.config.ts +0 -11
  15. package/dist/templates/nextjs-ts-landing-drizzle/project/eslint.config.mjs +0 -183
  16. package/dist/templates/nextjs-ts-landing-drizzle/project/next.config.mjs +0 -10
  17. package/dist/templates/nextjs-ts-landing-drizzle/project/package.json +0 -59
  18. package/dist/templates/nextjs-ts-landing-drizzle/project/postcss.config.js +0 -3
  19. package/dist/templates/nextjs-ts-landing-drizzle/project/public/next.svg +0 -1
  20. package/dist/templates/nextjs-ts-landing-drizzle/project/public/vercel.svg +0 -1
  21. package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/api/auth/[...nextauth]/route.ts +0 -3
  22. package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/favicon.ico +0 -0
  23. package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/globals.css +0 -161
  24. package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/layout.tsx +0 -25
  25. package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/page.tsx +0 -5
  26. package/dist/templates/nextjs-ts-landing-drizzle/project/src/auth.ts +0 -79
  27. package/dist/templates/nextjs-ts-landing-drizzle/project/src/components/ui/button.tsx +0 -49
  28. package/dist/templates/nextjs-ts-landing-drizzle/project/src/db/index.ts +0 -25
  29. package/dist/templates/nextjs-ts-landing-drizzle/project/src/db/schema.ts +0 -93
  30. package/dist/templates/nextjs-ts-landing-drizzle/project/src/lib/utils.ts +0 -6
  31. package/dist/templates/nextjs-ts-landing-drizzle/project/tailwind.config.ts +0 -80
  32. package/dist/templates/nextjs-ts-landing-drizzle/project/tsconfig.json +0 -27
package/dist/index.js CHANGED
@@ -73,10 +73,6 @@ var TEMPLATES = [
73
73
  title: "Nextjs ts with db setup Landing with prisma",
74
74
  value: "nextjs-ts-landing-prisma"
75
75
  },
76
- {
77
- title: "Nextjs ts with db setup Landing with drizzle",
78
- value: "nextjs-ts-landing-drizzle"
79
- },
80
76
  {
81
77
  title: "Nextjs ts clean",
82
78
  value: "nextjs-ts-clean"
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/.pnpm/tsup@8.4.0_typescript@5.8.2_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js","../index.ts","../helpers/install.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\r\n\r\nimport path from \"node:path\";\r\nimport { fileURLToPath } from \"node:url\";\r\nimport { cp, readFile, writeFile } from \"node:fs/promises\";\r\nimport { exec } from \"child_process\";\r\nimport { promisify } from \"util\";\r\n\r\nimport { cyan, green, red } from \"picocolors\";\r\nimport { glob } from \"glob\";\r\nimport color from \"picocolors\";\r\nimport prompts from \"prompts\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from \"yargs/helpers\";\r\n\r\nimport { install } from \"./helpers/install\";\r\nconst execAsync = promisify(exec);\r\n\r\n// Define the templates available\r\nconst TEMPLATES = [\r\n {\r\n title: \"Nextjs ts with db setup Landing with prisma\",\r\n value: \"nextjs-ts-landing-prisma\",\r\n },\r\n {\r\n title: \"Nextjs ts with db setup Landing with drizzle\",\r\n value: \"nextjs-ts-landing-drizzle\",\r\n },\r\n {\r\n title: 'Nextjs ts clean',\r\n value: 'nextjs-ts-clean'\r\n }\r\n];\r\n\r\n// Specify CLI arguments\r\nconst args = yargs(hideBin(process.argv)).options({\r\n name: {\r\n alias: \"n\",\r\n type: \"string\",\r\n description: \"Name of the project\",\r\n },\r\n template: {\r\n alias: \"t\",\r\n type: \"string\",\r\n description: \"Template to use\",\r\n },\r\n});\r\n\r\n// Override arguments passed on the CLI\r\nprompts.override(args.argv);\r\n\r\nasync function main() {\r\n // Get the initial values for the prompts\r\n const {\r\n _: [initialName, initialProject],\r\n } = await args.argv;\r\n\r\n // Create the project prompt\r\n const project = await prompts(\r\n [\r\n {\r\n type: \"text\",\r\n name: \"name\",\r\n message: \"What is the name of your project?\",\r\n initial: initialName || \"apppaaaul-project\",\r\n validate: (value) => {\r\n if (value !== \".\" && value.match(/[^a-zA-Z0-9-_]+/g)) {\r\n return \"Project name can only contain letters, numbers, dashes, underscores, or be '.' for the current directory\";\r\n }\r\n\r\n return true;\r\n },\r\n },\r\n {\r\n type: \"select\",\r\n name: \"template\",\r\n message: `Which template would you like to use?`,\r\n initial: initialProject || 0,\r\n choices: TEMPLATES,\r\n },\r\n ],\r\n {\r\n onCancel: () => {\r\n console.log(\"\\nBye 👋\\n\");\r\n\r\n process.exit(0);\r\n },\r\n },\r\n );\r\n\r\n // Get the template folder for the selected template\r\n const template = path.join(\r\n path.dirname(fileURLToPath(import.meta.url)),\r\n \"templates\",\r\n project.template,\r\n );\r\n\r\n // Get the destination folder for the project\r\n const destination = project.name === \".\" ? process.cwd() : path.join(process.cwd(), project.name);\r\n\r\n // Copy files from the template folder to the current directory\r\n await cp(path.join(template, \"project\"), destination, { recursive: true });\r\n\r\n // Get all files from the destination folder\r\n const files = await glob(`**/*`, { nodir: true, cwd: destination, absolute: true });\r\n\r\n // Read each file and replace the tokens\r\n for await (const file of files) {\r\n const data = await readFile(file, \"utf8\");\r\n const draft = data.replace(/{{name}}/g, project.name);\r\n\r\n await writeFile(file, draft, \"utf8\");\r\n }\r\n\r\n // Log outro message\r\n console.log(\"\\n✨ Project created ✨\");\r\n\r\n // Run commands if a new directory was created\r\n if (project.name !== \".\") {\r\n try {\r\n await execAsync(`cd ${project.name}`);\r\n console.log(`\\n${color.green(`cd`)} ${project.name}`);\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n }\r\n try {\r\n await execAsync(\"cursor .\");\r\n console.log(\"Installing packages. This might take a couple of minutes.\");\r\n console.log();\r\n await install();\r\n console.log();\r\n console.log(`${green(\"Success!\")} App installed successfully.`);\r\n console.log(cyan(\"Initializing the development server...\"));\r\n //TODO: Add docker-compose up, docker create db, pnpm run db:push\r\n await execAsync(\"pnpm dev\");\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n}\r\n\r\n// Run the main function\r\nmain().catch(console.error);\r\n","import spawn from \"cross-spawn\";\r\nimport { yellow } from \"picocolors\";\r\n\r\nexport async function install(): Promise<void> {\r\n const packageManager = \"pnpm\";\r\n const args: string[] = [\"install\"];\r\n\r\n return new Promise((resolve, reject) => {\r\n /**\r\n * Spawn the installation process.\r\n */\r\n const child = spawn(packageManager, args, {\r\n stdio: \"inherit\",\r\n env: {\r\n ...process.env,\r\n ADBLOCK: \"1\",\r\n // we set NODE_ENV to development as pnpm skips dev\r\n // dependencies when production\r\n NODE_ENV: \"development\",\r\n DISABLE_OPENCOLLECTIVE: \"1\",\r\n },\r\n });\r\n\r\n child.on(\"close\", (code) => {\r\n if (code !== 0) {\r\n reject({ command: `${packageManager} ${args.join(\" \")}` });\r\n\r\n return;\r\n }\r\n resolve();\r\n });\r\n });\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,OAClD,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEpC,IAAM,gBAAgC,iCAAiB;;;ACT9D,uBAAiB;AACjB,sBAA8B;AAC9B,sBAAwC;AACxC,2BAAqB;AACrB,kBAA0B;AAE1B,wBAAiC;AACjC,kBAAqB;AACrB,IAAAA,qBAAkB;AAClB,qBAAoB;AACpB,mBAAkB;AAClB,qBAAwB;;;ACbxB,yBAAkB;AAGlB,eAAsB,UAAyB;AAC7C,QAAM,iBAAiB;AACvB,QAAMC,QAAiB,CAAC,SAAS;AAEjC,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAItC,UAAM,YAAQ,mBAAAC,SAAM,gBAAgBD,OAAM;AAAA,MACxC,OAAO;AAAA,MACP,KAAK;AAAA,QACH,GAAG,QAAQ;AAAA,QACX,SAAS;AAAA;AAAA;AAAA,QAGT,UAAU;AAAA,QACV,wBAAwB;AAAA,MAC1B;AAAA,IACF,CAAC;AAED,UAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,UAAI,SAAS,GAAG;AACd,eAAO,EAAE,SAAS,GAAG,cAAc,IAAIA,MAAK,KAAK,GAAG,CAAC,GAAG,CAAC;AAEzD;AAAA,MACF;AACA,cAAQ;AAAA,IACV,CAAC;AAAA,EACH,CAAC;AACH;;;ADhBA,IAAM,gBAAY,uBAAU,yBAAI;AAGhC,IAAM,YAAY;AAAA,EAChB;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EAC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AG,QAAQ,IAAI;AAGhG,YAAM,oBAAG,iBAAAA,QAAK,KAAK,UAAU,SAAS,GAAG,aAAa,EAAE,WAAW,KAAK,CAAC;AAGzE,QAAM,QAAQ,UAAM,kBAAK,QAAQ,EAAE,OAAO,MAAM,KAAK,aAAa,UAAU,KAAK,CAAC;AAGlF,mBAAiB,QAAQ,OAAO;AAC9B,UAAM,OAAO,UAAM,0BAAS,MAAM,MAAM;AACxC,UAAM,QAAQ,KAAK,QAAQ,aAAa,QAAQ,IAAI;AAEpD,cAAM,2BAAU,MAAM,OAAO,MAAM;AAAA,EACrC;AAGA,UAAQ,IAAI,iCAAuB;AAGnC,MAAI,QAAQ,SAAS,KAAK;AACxB,QAAI;AACF,YAAM,UAAU,MAAM,QAAQ,IAAI,EAAE;AACpC,cAAQ,IAAI;AAAA,EAAK,mBAAAC,QAAM,MAAM,IAAI,CAAC,IAAI,QAAQ,IAAI,EAAE;AAAA,IACtD,SAAS,OAAO;AACd,cAAQ,MAAM,6BAA6B,KAAK,EAAE;AAAA,IACpD;AAAA,EACF;AACA,MAAI;AACF,UAAM,UAAU,UAAU;AAC1B,YAAQ,IAAI,2DAA2D;AACvE,YAAQ,IAAI;AACZ,UAAM,QAAQ;AACd,YAAQ,IAAI;AACZ,YAAQ,IAAI,OAAG,yBAAM,UAAU,CAAC,8BAA8B;AAC9D,YAAQ,QAAI,wBAAK,wCAAwC,CAAC;AAE1D,UAAM,UAAU,UAAU;AAAA,EAC5B,SAAS,OAAO;AACd,YAAQ,MAAM,6BAA6B,KAAK,EAAE;AAAA,EACpD;AACF;AAGA,KAAK,EAAE,MAAM,QAAQ,KAAK;","names":["import_picocolors","args","spawn","yargs","prompts","path","color"]}
1
+ {"version":3,"sources":["../node_modules/.pnpm/tsup@8.4.0_typescript@5.8.2_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js","../index.ts","../helpers/install.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\r\n\r\nimport path from \"node:path\";\r\nimport { fileURLToPath } from \"node:url\";\r\nimport { cp, readFile, writeFile } from \"node:fs/promises\";\r\nimport { exec } from \"child_process\";\r\nimport { promisify } from \"util\";\r\n\r\nimport { cyan, green, red } from \"picocolors\";\r\nimport { glob } from \"glob\";\r\nimport color from \"picocolors\";\r\nimport prompts from \"prompts\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from \"yargs/helpers\";\r\n\r\nimport { install } from \"./helpers/install\";\r\nconst execAsync = promisify(exec);\r\n\r\n// Define the templates available\r\nconst TEMPLATES = [\r\n {\r\n title: \"Nextjs ts with db setup Landing with prisma\",\r\n value: \"nextjs-ts-landing-prisma\",\r\n },\r\n {\r\n title: 'Nextjs ts clean',\r\n value: 'nextjs-ts-clean'\r\n }\r\n];\r\n\r\n// Specify CLI arguments\r\nconst args = yargs(hideBin(process.argv)).options({\r\n name: {\r\n alias: \"n\",\r\n type: \"string\",\r\n description: \"Name of the project\",\r\n },\r\n template: {\r\n alias: \"t\",\r\n type: \"string\",\r\n description: \"Template to use\",\r\n },\r\n});\r\n\r\n// Override arguments passed on the CLI\r\nprompts.override(args.argv);\r\n\r\nasync function main() {\r\n // Get the initial values for the prompts\r\n const {\r\n _: [initialName, initialProject],\r\n } = await args.argv;\r\n\r\n // Create the project prompt\r\n const project = await prompts(\r\n [\r\n {\r\n type: \"text\",\r\n name: \"name\",\r\n message: \"What is the name of your project?\",\r\n initial: initialName || \"apppaaaul-project\",\r\n validate: (value) => {\r\n if (value !== \".\" && value.match(/[^a-zA-Z0-9-_]+/g)) {\r\n return \"Project name can only contain letters, numbers, dashes, underscores, or be '.' for the current directory\";\r\n }\r\n\r\n return true;\r\n },\r\n },\r\n {\r\n type: \"select\",\r\n name: \"template\",\r\n message: `Which template would you like to use?`,\r\n initial: initialProject || 0,\r\n choices: TEMPLATES,\r\n },\r\n ],\r\n {\r\n onCancel: () => {\r\n console.log(\"\\nBye 👋\\n\");\r\n\r\n process.exit(0);\r\n },\r\n },\r\n );\r\n\r\n // Get the template folder for the selected template\r\n const template = path.join(\r\n path.dirname(fileURLToPath(import.meta.url)),\r\n \"templates\",\r\n project.template,\r\n );\r\n\r\n // Get the destination folder for the project\r\n const destination = project.name === \".\" ? process.cwd() : path.join(process.cwd(), project.name);\r\n\r\n // Copy files from the template folder to the current directory\r\n await cp(path.join(template, \"project\"), destination, { recursive: true });\r\n\r\n // Get all files from the destination folder\r\n const files = await glob(`**/*`, { nodir: true, cwd: destination, absolute: true });\r\n\r\n // Read each file and replace the tokens\r\n for await (const file of files) {\r\n const data = await readFile(file, \"utf8\");\r\n const draft = data.replace(/{{name}}/g, project.name);\r\n\r\n await writeFile(file, draft, \"utf8\");\r\n }\r\n\r\n // Log outro message\r\n console.log(\"\\n✨ Project created ✨\");\r\n\r\n // Run commands if a new directory was created\r\n if (project.name !== \".\") {\r\n try {\r\n await execAsync(`cd ${project.name}`);\r\n console.log(`\\n${color.green(`cd`)} ${project.name}`);\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n }\r\n try {\r\n await execAsync(\"cursor .\");\r\n console.log(\"Installing packages. This might take a couple of minutes.\");\r\n console.log();\r\n await install();\r\n console.log();\r\n console.log(`${green(\"Success!\")} App installed successfully.`);\r\n console.log(cyan(\"Initializing the development server...\"));\r\n //TODO: Add docker-compose up, docker create db, pnpm run db:push\r\n await execAsync(\"pnpm dev\");\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n}\r\n\r\n// Run the main function\r\nmain().catch(console.error);\r\n","import spawn from \"cross-spawn\";\r\nimport { yellow } from \"picocolors\";\r\n\r\nexport async function install(): Promise<void> {\r\n const packageManager = \"pnpm\";\r\n const args: string[] = [\"install\"];\r\n\r\n return new Promise((resolve, reject) => {\r\n /**\r\n * Spawn the installation process.\r\n */\r\n const child = spawn(packageManager, args, {\r\n stdio: \"inherit\",\r\n env: {\r\n ...process.env,\r\n ADBLOCK: \"1\",\r\n // we set NODE_ENV to development as pnpm skips dev\r\n // dependencies when production\r\n NODE_ENV: \"development\",\r\n DISABLE_OPENCOLLECTIVE: \"1\",\r\n },\r\n });\r\n\r\n child.on(\"close\", (code) => {\r\n if (code !== 0) {\r\n reject({ command: `${packageManager} ${args.join(\" \")}` });\r\n\r\n return;\r\n }\r\n resolve();\r\n });\r\n });\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,OAClD,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEpC,IAAM,gBAAgC,iCAAiB;;;ACT9D,uBAAiB;AACjB,sBAA8B;AAC9B,sBAAwC;AACxC,2BAAqB;AACrB,kBAA0B;AAE1B,wBAAiC;AACjC,kBAAqB;AACrB,IAAAA,qBAAkB;AAClB,qBAAoB;AACpB,mBAAkB;AAClB,qBAAwB;;;ACbxB,yBAAkB;AAGlB,eAAsB,UAAyB;AAC7C,QAAM,iBAAiB;AACvB,QAAMC,QAAiB,CAAC,SAAS;AAEjC,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAItC,UAAM,YAAQ,mBAAAC,SAAM,gBAAgBD,OAAM;AAAA,MACxC,OAAO;AAAA,MACP,KAAK;AAAA,QACH,GAAG,QAAQ;AAAA,QACX,SAAS;AAAA;AAAA;AAAA,QAGT,UAAU;AAAA,QACV,wBAAwB;AAAA,MAC1B;AAAA,IACF,CAAC;AAED,UAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,UAAI,SAAS,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picocolors","args","spawn","yargs","prompts","path","color"]}
@@ -0,0 +1,43 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ /node_modules
5
+ /.pnp
6
+ .pnp.js
7
+
8
+ # testing
9
+ /coverage
10
+
11
+ # next.js
12
+ /.next/
13
+ /out/
14
+
15
+ # production
16
+ /build
17
+
18
+ # misc
19
+ .DS_Store
20
+ *.pem
21
+
22
+ # debug
23
+ npm-debug.log*
24
+ yarn-debug.log*
25
+ yarn-error.log*
26
+
27
+ # local env files
28
+ .env*.local
29
+ .env
30
+
31
+ # vercel
32
+ .vercel
33
+
34
+ # typescript
35
+ *.tsbuildinfo
36
+ next-env.d.ts
37
+
38
+ # docker
39
+ docker-compose.yml
40
+
41
+ # pnpm
42
+ pnpm-lock.yaml
43
+ pnpm-*
@@ -1,67 +1,90 @@
1
- import globals from "globals";
1
+ import { FlatCompat } from "@eslint/eslintrc";
2
+ import { defineConfig } from "eslint/config";
2
3
  import tseslint from "typescript-eslint";
3
- import eslintPluginReact from "eslint-plugin-react";
4
- import eslintPluginReactHooks from "eslint-plugin-react-hooks";
5
- import {fixupPluginRules} from "@eslint/compat";
6
- import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
4
+ import eslintJs from "@eslint/js";
5
+ import eslintReact from "@eslint-react/eslint-plugin";
6
+ import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
7
7
  import eslintPluginImport from "eslint-plugin-import";
8
8
  import eslintPluginReactCompiler from "eslint-plugin-react-compiler";
9
- import eslintPluginNext from "@next/eslint-plugin-next";
10
9
  import eslintPluginJsxA11y from "eslint-plugin-jsx-a11y";
10
+ import eslintPluginReact from "eslint-plugin-react";
11
+ import eslintPluginStylistic from "@stylistic/eslint-plugin";
11
12
 
12
- export default [
13
- // Ignores configuration
13
+ const compat = new FlatCompat({
14
+ baseDirectory: import.meta.dirname,
15
+ });
16
+
17
+ const languageLintingConfig = tseslint.config(
14
18
  {
15
- ignores: ["node_modules", ".next", "out", "coverage", ".idea"],
19
+ files: ["**/*.{ts,tsx,js,mjs,cjs}"],
20
+ languageOptions: {
21
+ parser: tseslint.parser,
22
+ parserOptions: {
23
+ projectService: {
24
+ allowDefaultProject: ["*.js", "*.mjs", "*.cjs"],
25
+ },
26
+ tsconfigRootDir: import.meta.dirname,
27
+ },
28
+ },
16
29
  },
17
- // General configuration
30
+ eslintJs.configs.recommended,
31
+ tseslint.configs.strictTypeChecked,
32
+ tseslint.configs.stylisticTypeChecked,
33
+ eslintPluginStylistic.configs.recommended,
18
34
  {
19
35
  rules: {
20
- "padding-line-between-statements": [
36
+ "no-console": ["warn", { allow: ["error"] }],
37
+ "@stylistic/padding-line-between-statements": [
21
38
  "warn",
22
- {blankLine: "always", prev: "*", next: ["return", "export"]},
23
- {blankLine: "always", prev: ["const", "let", "var"], next: "*"},
24
- {blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]},
39
+ { blankLine: "always", prev: "*", next: ["return", "export"] },
40
+ { blankLine: "always", prev: ["const", "let", "var"], next: "*" },
41
+ {
42
+ blankLine: "any",
43
+ prev: ["const", "let", "var"],
44
+ next: ["const", "let", "var"],
45
+ },
25
46
  ],
26
- "no-console": ["warn", {allow: ["error"]}],
47
+ "@typescript-eslint/no-unused-vars": [
48
+ "warn",
49
+ {
50
+ args: "after-used",
51
+ ignoreRestSiblings: false,
52
+ argsIgnorePattern: "^_.*?$",
53
+ caughtErrorsIgnorePattern: "^_.*?$",
54
+ },
55
+ ],
56
+ "@typescript-eslint/no-unsafe-member-access": "off",
57
+ "@typescript-eslint/no-confusing-void-expression": "off",
58
+ "@typescript-eslint/ban-ts-comment": "off",
59
+ "@typescript-eslint/no-explicit-any": "off",
60
+ "@typescript-eslint/no-inferrable-types": "off",
61
+ // Optionals
62
+ // "@typescript-eslint/no-floating-promises": "off",
63
+ // "@typescript-eslint/no-non-null-assertion": "off",
27
64
  },
28
65
  },
29
- // React configuration
66
+ );
67
+
68
+ const reactLintingConfig = defineConfig([
30
69
  {
31
- plugins: {
32
- react: fixupPluginRules(eslintPluginReact),
33
- "react-hooks": fixupPluginRules(eslintPluginReactHooks),
34
- "react-compiler": fixupPluginRules(eslintPluginReactCompiler),
35
- "jsx-a11y": fixupPluginRules(eslintPluginJsxA11y),
36
- },
37
- languageOptions: {
38
- parserOptions: {
39
- ecmaFeatures: {
40
- jsx: true,
41
- },
42
- },
43
- globals: {
44
- ...globals.browser,
45
- ...globals.serviceworker,
46
- },
47
- },
70
+ files: ["**/*.{tsx,jsx}"],
48
71
  settings: {
49
72
  react: {
50
73
  version: "detect",
51
74
  },
52
75
  },
76
+ },
77
+ eslintPluginReact.configs.flat.recommended,
78
+ eslintPluginReact.configs.flat["jsx-runtime"],
79
+ eslintReact.configs["recommended-type-checked"],
80
+ eslintPluginReactCompiler.configs.recommended,
81
+ {
53
82
  rules: {
54
- ...eslintPluginReact.configs.recommended.rules,
55
- ...eslintPluginJsxA11y.configs.recommended.rules,
56
- ...eslintPluginReactHooks.configs.recommended.rules,
57
- "react/jsx-boolean-value": ["error", "never"],
58
- "react/jsx-curly-brace-presence": ["error", {props: "never", children: "never"}],
59
- "react/jsx-no-useless-fragment": "error",
60
- "react/prop-types": "off",
61
- "react/jsx-uses-react": "off",
83
+ "@eslint-react/no-useless-fragment": "error",
84
+ "@eslint-react/no-missing-key": "warn",
62
85
  "react/no-array-index-key": "off",
63
- "react/react-in-jsx-scope": "off",
64
86
  "react/self-closing-comp": "warn",
87
+ "react/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
65
88
  "react/jsx-sort-props": [
66
89
  "warn",
67
90
  {
@@ -71,73 +94,56 @@ export default [
71
94
  reservedFirst: true,
72
95
  },
73
96
  ],
74
- "react-compiler/react-compiler": "error",
75
- "react/jsx-no-leaked-render": "off",
76
- "jsx-a11y/no-static-element-interactions": "off",
97
+ },
98
+ },
99
+ ]);
100
+
101
+ const reactA11yLintingConfig = defineConfig([
102
+ {
103
+ files: ["**/*.{tsx,jsx}"],
104
+ },
105
+ eslintPluginJsxA11y.flatConfigs.recommended,
106
+ {
107
+ rules: {
77
108
  "jsx-a11y/click-events-have-key-events": "off",
78
- "jsx-a11y/html-has-lang": "off",
79
109
  },
80
110
  },
81
- // TypeScript configuration
82
- ...[
83
- ...tseslint.configs.recommended,
84
- {
85
- rules: {
86
- "@typescript-eslint/ban-ts-comment": "off",
87
- "@typescript-eslint/no-empty-object-type": "error",
88
- "@typescript-eslint/no-unsafe-function-type": "error",
89
- "@typescript-eslint/no-wrapper-object-types": "error",
90
- "@typescript-eslint/no-empty-function": "off",
91
- "@typescript-eslint/no-explicit-any": "off",
92
- "@typescript-eslint/no-inferrable-types": "off",
93
- "@typescript-eslint/no-namespace": "off",
94
- "@typescript-eslint/no-non-null-assertion": "off",
95
- "@typescript-eslint/no-shadow": "off",
96
- "@typescript-eslint/explicit-function-return-type": "off",
97
- "@typescript-eslint/require-await": "off",
98
- "@typescript-eslint/no-floating-promises": "off",
99
- "@typescript-eslint/no-confusing-void-expression": "off",
100
- "@typescript-eslint/no-unused-vars": [
101
- "warn",
102
- {
103
- args: "after-used",
104
- ignoreRestSiblings: false,
105
- argsIgnorePattern: "^_.*?$",
106
- caughtErrorsIgnorePattern: "^_.*?$",
107
- },
108
- ],
109
- },
111
+ ]);
112
+
113
+ const nextLintingConfig = defineConfig([
114
+ {
115
+ files: ["**/*.{tsx,jsx}"],
116
+ },
117
+ compat.extends("plugin:@next/next/recommended"),
118
+ {
119
+ rules: {
120
+ "@next/next/no-img-element": "off",
110
121
  },
111
- ],
112
- // Prettier configuration
113
- ...[
114
- eslintPluginPrettier,
115
- {
116
- rules: {
117
- "prettier/prettier": [
118
- "warn",
119
- {
120
- printWidth: 100,
121
- trailingComma: "all",
122
- tabWidth: 2,
123
- semi: true,
124
- singleQuote: false,
125
- bracketSpacing: true,
126
- arrowParens: "always",
127
- endOfLine: "auto",
128
- plugins: ["prettier-plugin-tailwindcss"],
129
- },
130
- ],
122
+ },
123
+ ]);
124
+
125
+ const importLintingConfig = defineConfig([
126
+ {
127
+ files: ["**/*.{ts,tsx,js,mjs,cjs}"],
128
+ },
129
+ {
130
+ settings: {
131
+ "import/resolver": {
132
+ typescript: true,
133
+ node: true,
131
134
  },
132
135
  },
133
- ],
134
- // Import configuration
136
+ },
137
+ eslintPluginImport.flatConfigs.recommended,
138
+ eslintPluginImport.flatConfigs.typescript,
135
139
  {
136
- plugins: {
137
- import: fixupPluginRules(eslintPluginImport),
138
- },
139
140
  rules: {
140
141
  "import/no-default-export": "off",
142
+ "import/no-named-as-default-member": "off",
143
+ "import/named": "off",
144
+ "import/namespace": "off",
145
+ "import/default": "off",
146
+ "import/no-unresolved": "off",
141
147
  "import/order": [
142
148
  "warn",
143
149
  {
@@ -163,21 +169,38 @@ export default [
163
169
  ],
164
170
  },
165
171
  },
166
- // Next configuration
172
+ ]);
173
+
174
+ const prettierLintingConfig = defineConfig([
175
+ {
176
+ files: ["**/*.{ts,tsx,js,mjs,cjs}"],
177
+ },
178
+ eslintPluginPrettierRecommended,
167
179
  {
168
- plugins: {
169
- "@next/next": fixupPluginRules(eslintPluginNext),
170
- },
171
- languageOptions: {
172
- globals: {
173
- ...globals.node,
174
- ...globals.browser,
175
- },
176
- },
177
180
  rules: {
178
- ...eslintPluginNext.configs.recommended.rules,
179
- "@next/next/no-img-element": "off",
180
- "@next/next/no-html-link-for-pages": "off",
181
+ "prettier/prettier": [
182
+ "warn",
183
+ {
184
+ printWidth: 100,
185
+ trailingComma: "all",
186
+ tabWidth: 2,
187
+ semi: true,
188
+ singleQuote: false,
189
+ bracketSpacing: true,
190
+ arrowParens: "always",
191
+ endOfLine: "auto",
192
+ plugins: ["prettier-plugin-tailwindcss"],
193
+ },
194
+ ],
181
195
  },
182
196
  },
183
- ];
197
+ ]);
198
+
199
+ export default defineConfig([
200
+ languageLintingConfig,
201
+ reactLintingConfig,
202
+ reactA11yLintingConfig,
203
+ nextLintingConfig,
204
+ importLintingConfig,
205
+ prettierLintingConfig,
206
+ ]);
@@ -6,34 +6,35 @@
6
6
  "dev": "next dev --turbopack",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint",
10
- "prod": "pnpm build && git checkout main && git pull origin main && git merge dev && pnpm version patch && git push origin main && git tag latest --force && git push origin main --tags --force && git checkout dev && echo ✅ Deploy completado"
11
- },
9
+ "lint": "eslint .",
10
+ "prod": "pnpm lint && pnpm build && git checkout main && git pull origin main && git merge dev && pnpm version patch && git push origin main && git checkout dev && echo ✅ Deploy completado",
11
+ "dev-rebase": "node src/scripts/dev-rebase.js"
12
+ },
12
13
  "dependencies": {
13
14
  "@radix-ui/react-slot": "^1.2.3",
14
- "@tailwindcss/postcss": "^4.1.11",
15
+ "@tailwindcss/postcss": "^4.1.13",
15
16
  "autoprefixer": "^10.4.21",
16
17
  "class-variance-authority": "^0.7.1",
17
18
  "clsx": "^2.1.1",
18
- "lucide-react": "^0.539.0",
19
- "next": "^15.4.6",
19
+ "lucide-react": "^0.544.0",
20
+ "next": "^15.5.3",
20
21
  "postcss": "^8.5.6",
21
22
  "react": "19.1.1",
22
23
  "react-dom": "19.1.1",
23
24
  "tailwind-merge": "^3.3.1",
24
- "tailwindcss": "^4.1.11",
25
+ "tailwindcss": "^4.1.13",
25
26
  "tailwindcss-animate": "^1.0.7"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@eslint/compat": "^1.3.2",
29
- "@next/eslint-plugin-next": "15.4.6",
30
- "@types/node": "^24.2.1",
31
- "@types/react": "^19.1.9",
32
- "@types/react-dom": "^19.1.7",
30
+ "@next/eslint-plugin-next": "15.5.3",
31
+ "@types/node": "^24.3.1",
32
+ "@types/react": "^19.1.12",
33
+ "@types/react-dom": "^19.1.9",
33
34
  "@vercel/style-guide": "^6.0.0",
34
35
  "babel-plugin-react-compiler": "19.0.0-beta-e1e972c-20250221",
35
- "eslint": "^9.33.0",
36
- "eslint-config-next": "^15.4.6",
36
+ "eslint": "^9.35.0",
37
+ "eslint-config-next": "^15.5.3",
37
38
  "eslint-config-prettier": "^10.1.8",
38
39
  "eslint-plugin-import": "^2.32.0",
39
40
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -41,10 +42,11 @@
41
42
  "eslint-plugin-react": "^7.37.5",
42
43
  "eslint-plugin-react-compiler": "0.0.0-experimental-c8b3f72-20240517",
43
44
  "eslint-plugin-react-hooks": "^5.2.0",
44
- "globals": "^16.3.0",
45
+ "globals": "^16.4.0",
45
46
  "prettier": "^3.6.2",
46
47
  "prettier-plugin-tailwindcss": "^0.6.14",
48
+ "tsx": "^4.20.5",
47
49
  "typescript": "^5.9.2",
48
- "typescript-eslint": "^8.39.0"
50
+ "typescript-eslint": "^8.43.0"
49
51
  }
50
52
  }
@@ -0,0 +1,42 @@
1
+ import { execSync } from "child_process";
2
+
3
+ function run(cmd) {
4
+ execSync(cmd, { stdio: "inherit" });
5
+ }
6
+
7
+ try {
8
+ const branch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim();
9
+
10
+ run("git fetch origin");
11
+ run("git checkout dev");
12
+ run("git pull origin dev");
13
+ run(`git checkout ${branch}`);
14
+ run("git rebase dev");
15
+ run("git checkout dev");
16
+ run(`git merge ${branch}`);
17
+
18
+ // Verificar si la rama ya está mergeada en dev
19
+ const isMerged = execSync(`git branch --merged dev`).toString().includes(branch);
20
+
21
+ if (isMerged) {
22
+ run(`git branch -d ${branch}`);
23
+ // Eliminar la rama del repositorio remoto si existe
24
+ try {
25
+ run(`git push origin --delete ${branch}`);
26
+ console.error(`✅ Rama ${branch} rebaseada, mergeada en dev y eliminada local y remotamente`);
27
+ } catch (remoteDeleteError) {
28
+ console.error(
29
+ `✅ Rama ${branch} rebaseada, mergeada en dev y eliminada localmente (no existía en remoto)`,
30
+ );
31
+ }
32
+ } else {
33
+ console.error(
34
+ `⚠️ La rama ${branch} todavía no está completamente mergeada en dev, no se elimina.`,
35
+ );
36
+ }
37
+ run("git push origin dev");
38
+ run("git remote prune origin");
39
+ } catch (err) {
40
+ console.error("❌ Error en el proceso:", err.message);
41
+ process.exit(1);
42
+ }
@@ -0,0 +1,46 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ /node_modules
5
+ /.pnp
6
+ .pnp.js
7
+
8
+ # testing
9
+ /coverage
10
+
11
+ # next.js
12
+ /.next/
13
+ /out/
14
+
15
+ # production
16
+ /build
17
+
18
+ # misc
19
+ .DS_Store
20
+ *.pem
21
+
22
+ # debug
23
+ npm-debug.log*
24
+ yarn-debug.log*
25
+ yarn-error.log*
26
+
27
+ # local env files
28
+ .env*.local
29
+ .env
30
+
31
+ # vercel
32
+ .vercel
33
+
34
+ # typescript
35
+ *.tsbuildinfo
36
+ next-env.d.ts
37
+
38
+ # docker
39
+ docker-compose.yml
40
+
41
+ # prisma
42
+ prisma/generated/*
43
+
44
+ # pnpm
45
+ pnpm-lock.yaml
46
+ pnpm-*