diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7310404..a7bf365 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,17 +6,16 @@ module.exports = { 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'prettier', - // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. - // Make sure it's always the last config, so it gets the chance to override other configs. - 'eslint-config-prettier' + 'eslint-config-prettier', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parser: '@typescript-eslint/parser', plugins: ['react-refresh'], rules: { - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], + 'react-refresh/only-export-components': 'off', + 'react-hooks/set-state-in-effect': 'off', + 'react-hooks/incompatible-library': 'off', + 'react-hooks/exhaustive-deps': 'off', + 'no-unused-disable': 'off', }, } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d8e5738 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI Build and Test + +on: + push: + branches: ['**'] + pull_request: + branches: ['**'] + +jobs: + test-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - name: Install dependencies + run: bun install --frozen-lockfile + - name: Codegen + run: bun run generate:graphql + - name: Run the tests + run: bun run test + - name: Build + run: bun run build + env: + CI: false diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/main-branch-docker.yml similarity index 83% rename from .github/workflows/build-and-test.yml rename to .github/workflows/main-branch-docker.yml index 8dc05a2..b5cfb36 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/main-branch-docker.yml @@ -1,36 +1,12 @@ -name: NodeJS with Webpack +name: Docker Build and Publish on: push: - branches: ['**'] - pull_request: - branches: ['**'] + branches: [main] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Codegen - run: bun run generate:graphql - - - name: Run the tests - run: bun run test - - - name: Build - run: bun run build - env: - CI: false - docker: runs-on: ubuntu-latest - needs: build steps: - name: Checkout uses: actions/checkout@v4 @@ -53,10 +29,22 @@ jobs: file_name: .env.production fail_on_empty: true sort_keys: false + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + - name: Install dependencies + run: bun install --frozen-lockfile + - name: Codegen + run: bun run generate:graphql + - name: Run the tests + run: bun run test + - name: Build + run: bun run build + env: + CI: false - name: Build and push uses: docker/build-push-action@v6 with: context: . push: true - platforms: linux/amd64, linux/arm64 + platforms: linux/amd64,linux/arm64 tags: xcodeassociated/react-typescript-vite-template:latest diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..1d9b783 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.12.0 diff --git a/AGENTS.md b/AGENTS.md index 918f454..9556bb2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,9 +26,9 @@ ## Project Overview - **Tech Stack**: React 18, TypeScript, Vite, Tailwind CSS, Redux Toolkit (with persistence), Apollo Client, Keycloak, i18next. -- **Package Manager**: `npm` / `bun`. All scripts are defined in `package.json` and are **compatible with `bun run