diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 0af223a..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This is intended to be a basic starting point for linting in your app. - * It relies on recommended configs out of the box for simplicity, but you can - * and should modify this configuration to best suit your team's needs. - */ - -/** @type {import('eslint').Linter.Config} */ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - }, - env: { - browser: true, - commonjs: true, - es6: true, - }, - ignorePatterns: ["!**/.server", "!**/.client"], - - // Base config - extends: ["eslint:recommended"], - - overrides: [ - // React - { - files: ["**/*.{js,jsx,ts,tsx}"], - plugins: ["react", "jsx-a11y"], - extends: [ - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", - ], - settings: { - react: { - version: "detect", - }, - formComponents: ["Form"], - linkComponents: [ - { name: "Link", linkAttribute: "to" }, - { name: "NavLink", linkAttribute: "to" }, - ], - "import/resolver": { - typescript: {}, - }, - }, - }, - - // Typescript - { - files: ["**/*.{ts,tsx}"], - plugins: ["@typescript-eslint", "import", "prefer-let"], - parser: "@typescript-eslint/parser", - settings: { - "import/internal-regex": "^~/", - "import/resolver": { - node: { - extensions: [".ts", ".tsx"], - }, - typescript: { - alwaysTryTypes: true, - }, - }, - }, - extends: [ - "plugin:@typescript-eslint/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - ], - rules: { - "@typescript-eslint/no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^ignored", - args: "after-used", - ignoreRestSiblings: true, - }, - ], - }, - }, - - // Node - { - files: [".eslintrc.cjs", "mocks/index.cjs"], - env: { - node: true, - }, - }, - ], -}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e88e676 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +packages/wordle/app/generated/** linguist-generated diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 120000 index 0000000..be77ac8 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +../AGENTS.md \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 53274ac..4d60160 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,13 +4,35 @@ updates: directory: / schedule: interval: daily + assignees: + - "mcansh" - package-ecosystem: npm directory: / schedule: interval: weekly - day: "monday" time: "10:00" timezone: "America/Detroit" - labels: - - "dependencies" + assignees: + - "mcansh" + groups: + "remix": + patterns: + - "@remix-run/*" + - "remix" + "vitest": + patterns: + - "@vitest/*" + - "vitest" + "prisma": + patterns: + - "@prisma/*" + - "prisma" + "tailwindcss": + patterns: + - "@tailwindcss/*" + - "tailwindcss" + "oxc": + patterns: + - "oxlint" + - "oxfmt" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d712913 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: ๐Ÿงช Test + +on: + push: + pull_request: + +env: + DATABASE_URL: postgresql://postgres:password@localhost:5432/remix_wordle_test + REDIS_URL: redis://localhost:6379 + SESSION_SECRET: thisisaverysecuresecret1234567890 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: ๐Ÿงช Test + if: github.repository == 'mcansh/remix-wordle' + + runs-on: ubuntu-slim + steps: + - name: โฌ‡๏ธ Checkout repo + uses: actions/checkout@v5 + + - name: โŽ” Setup node + uses: actions/setup-node@v6 + with: + node-version-file: ".node-version" + + - uses: pnpm/action-setup@v4 + name: ๐ŸŸง Install pnpm + with: + cache: true + + - name: ๐ŸŸง Install dependencies + run: pnpm install --recursive --frozen-lockfile --strict-peer-dependencies + + - name: ๐Ÿ› ๏ธ Build + run: pnpm run build + + - name: ๐Ÿงช Run Tests + run: pnpm run test diff --git a/.gitignore b/.gitignore index d0f87e7..b496775 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ node_modules /.cache -/build +**/build/** +**/dist/** .env .DS_Store +**/coverage/** diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 083cf3f..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -npx lint-staged diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24 diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 0000000..aa32396 --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,248 @@ +{ + "lsp": { + "oxlint": { + "initialization_options": { + "settings": { + "configPath": "./.oxlintrc.json", + "run": "onType", + "disableNestedConfig": false, + "fixKind": "safe_fix", + "typeAware": true, + "unusedDisableDirectives": "deny" + } + } + }, + "oxfmt": { + "initialization_options": { + "settings": { + "configPath": "./vite.config.ts", + "run": "onSave" + } + } + } + }, + "languages": { + "CSS": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "GraphQL": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Handlebars": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "HTML": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JavaScript": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ], + "code_action": "source.fixAll.oxc" + }, + "JSX": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSON": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSON5": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSONC": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Less": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Markdown": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "MDX": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "SCSS": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "TypeScript": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "TSX": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Vue": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "YAML": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + } + } +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..f190a52 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,76 @@ + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. + +## Vite+ Workflow + +`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +### Start + +- create - Create a new project from a template +- migrate - Migrate an existing project to Vite+ +- config - Configure hooks and agent integration +- staged - Run linters on staged files +- install (`i`) - Install dependencies +- env - Manage Node.js versions + +### Develop + +- dev - Run the development server +- check - Run format, lint, and TypeScript type checks +- lint - Lint code +- fmt - Format code +- test - Run tests + +### Execute + +- run - Run monorepo tasks +- exec - Execute a command from local `node_modules/.bin` +- dlx - Execute a package binary without installing it as a dependency +- cache - Manage the task cache + +### Build + +- build - Build for production +- pack - Build libraries +- preview - Preview production build + +### Manage Dependencies + +Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles. + +- add - Add packages to dependencies +- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies +- update (`up`) - Update packages to latest versions +- dedupe - Deduplicate dependencies +- outdated - Check for outdated packages +- list (`ls`) - List installed packages +- why (`explain`) - Show why a package is installed +- info (`view`, `show`) - View package information from the registry +- link (`ln`) / unlink - Manage local package links +- pm - Forward a command to the package manager + +### Maintain + +- upgrade - Update `vp` itself to the latest version + +These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs. + +## Common Pitfalls + +- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations. +- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead. +- **Running scripts:** Vite+ built-in commands (`vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool, not any `package.json` script of the same name. To run a custom script that shares a name with a built-in command, use `vp run