diff --git a/.editorconfig b/.editorconfig index 1b8b4b30..07b43660 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,3 +14,8 @@ end_of_line = lf indent_style = tab indent_size = 2 max_line_length = 80 + +[*.{yaml,yml}] +# YAML files should use spaces, not tabs +indent_style = space +indent_size = 2 diff --git a/.env.local.example b/.env.local.example index 43e3704b..099ada7f 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,5 +1,5 @@ # Your WordPress site URL -NEXT_PUBLIC_WORDPRESS_URL=https://faustjstoolkit.wpenginepowered.com/ +NEXT_PUBLIC_WORDPRESS_URL=https://cms.faustjs.org/ # Your Next site URL NEXT_PUBLIC_SITE_URL=http://localhost:3000/ diff --git a/.github/actions/enable-corepack/action.yml b/.github/actions/enable-corepack/action.yml new file mode 100644 index 00000000..36ef3bd2 --- /dev/null +++ b/.github/actions/enable-corepack/action.yml @@ -0,0 +1,14 @@ +name: "Enable Corepack" +description: "Setup Corepack with latest version and enable" + +runs: + using: "composite" # Mandatory parameter + steps: + - name: Update & Enable Corepack + shell: bash + run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index 4046eb27..3c401593 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -25,15 +25,14 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Enable Corepack - run: corepack enable + - uses: ./.github/actions/enable-corepack - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile check_format: - name: Validate formating with Prettier + name: Validate formatting with Prettier runs-on: ubuntu-latest needs: [setup] steps: @@ -43,8 +42,7 @@ jobs: - name: Set up Node.js uses: ./.github/actions/cache-restore - - name: Enable Corepack - run: corepack enable + - uses: ./.github/actions/enable-corepack - name: Format source code run: pnpm run test:format @@ -60,8 +58,7 @@ jobs: - name: Set up Node.js uses: ./.github/actions/cache-restore - - name: Enable Corepack - run: corepack enable + - uses: ./.github/actions/enable-corepack - name: Check Linting run: pnpm run test:lint diff --git a/eslint.config.mjs b/eslint.config.mjs index 958bfca9..a8f73815 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,7 +9,6 @@ import { } from "eslint-config-neon"; import jsxA11y from "eslint-config-neon/jsx-a11y"; import * as mdx from "eslint-plugin-mdx"; -// eslint-disable-next-line import-x/no-extraneous-dependencies -- we want the version of unicorn that is bundled with eslint-config-neon import unicorn from "eslint-plugin-unicorn"; /** diff --git a/next.config.mjs b/next.config.mjs index d12f65f0..79805438 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -121,6 +121,12 @@ const nextConfig = { destination: "https://discord.gg/headless-wordpress-836253505944813629", permanent: false, }, + { + source: "/community-meeting", + destination: + "https://discord.gg/headless-wordpress-836253505944813629?event=1336404483013480588", + permanent: false, + }, ]; }, images: { diff --git a/package.json b/package.json index 5dff2d3b..ce9fe7b2 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "shiki": "^2.2.0" }, "devDependencies": { + "eslint-plugin-unicorn": "^56.0.1", "@tailwindcss/postcss": "^4.0.1", "@tailwindcss/typography": "^0.5.15", "eslint": "^9.19.0", @@ -67,7 +68,7 @@ "node": "^22", "npm": "use-pnpm" }, - "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0", + "packageManager": "pnpm@10.2.0+sha512.0d27364e0139c6aadeed65ada153135e0ca96c8da42123bd50047f961339dc7a758fc2e944b428f52be570d1bd3372455c1c65fa2e7aa0bfbf931190f9552001", "lint-staged": { "*": "pnpm format", "*.{js,jsx}": "pnpm lint" @@ -75,6 +76,12 @@ "pnpm": { "patchedDependencies": { "rehype-pretty-code": "patches/rehype-pretty-code.patch" + }, + "onlyBuiltDependencies": [ + "sharp" + ], + "overrides": { + "eslint-plugin-unicorn": "$eslint-plugin-unicorn" } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da3338e3..8fbe1798 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,9 +4,12 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + eslint-plugin-unicorn: ^56.0.1 + patchedDependencies: rehype-pretty-code: - hash: pgwokt5cuarlruvtc6jfjh7deu + hash: cd67d20941f11a3159aa1d357c78f6305540c48de316b86fb3f9e07597add478 path: patches/rehype-pretty-code.patch importers: @@ -99,7 +102,7 @@ importers: version: 1.2.0 rehype-pretty-code: specifier: ^0.14.0 - version: 0.14.0(patch_hash=pgwokt5cuarlruvtc6jfjh7deu)(shiki@2.2.0) + version: 0.14.0(patch_hash=cd67d20941f11a3159aa1d357c78f6305540c48de316b86fb3f9e07597add478)(shiki@2.2.0) rehype-slug: specifier: ^6.0.0 version: 6.0.0 @@ -125,6 +128,9 @@ importers: eslint-plugin-mdx: specifier: ^3.1.5 version: 3.1.5(eslint@9.19.0(jiti@2.4.2)) + eslint-plugin-unicorn: + specifier: ^56.0.1 + version: 56.0.1(eslint@9.19.0(jiti@2.4.2)) husky: specifier: ^9.1.7 version: 9.1.7 @@ -11182,7 +11188,7 @@ snapshots: hast-util-from-html: 2.0.3 unified: 11.0.5 - rehype-pretty-code@0.14.0(patch_hash=pgwokt5cuarlruvtc6jfjh7deu)(shiki@2.2.0): + rehype-pretty-code@0.14.0(patch_hash=cd67d20941f11a3159aa1d357c78f6305540c48de316b86fb3f9e07597add478)(shiki@2.2.0): dependencies: '@types/hast': 3.0.4 hast-util-to-string: 3.0.1