Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(formatting): add prettier and format project #6

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Lint

permissions: read-all

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
pull-requests: write
checks: write
strategy:
matrix:
node-version: [22]
steps:
- uses: actions/checkout@v2

- name: Get PNPM version from package.json
id: pnpm-version
shell: bash
run: echo "pnpm_version=$(node -p "require('./package.json').engines.pnpm")" >> "$GITHUB_OUTPUT"

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.pnpm-version.outputs.pnpm_version }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Gather lint results
run: pnpm run lint:report
continue-on-error: true

- name: Upload lint results
uses: ataylorme/eslint-annotate-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
report-json: "eslint_report.json"
8 changes: 4 additions & 4 deletions .github/workflows/nuxt-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20 ]
node-version: [22]
steps:
- uses: actions/checkout@v3
- run: corepack enable
Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"
- run: pnpm install
- run: NUXT_APP_BASE_URL=/web/ pnpm dlx nuxt build --preset github_pages
- name: Upload artifact
Expand All @@ -35,8 +35,8 @@ jobs:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github_pages environment
environment:
name: github_pages
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.output
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-tailwindcss"]
}
16 changes: 4 additions & 12 deletions components/CatchSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<div
class="mx-auto my-[5rem] flex w-full max-w-screen-xl flex-1 flex-row items-center justify-center max-md:my-[2rem] max-md:mt-4 max-md:w-full max-md:flex-col"
>
<div class="w-full max-w-screen-xl dark:text-white max-md:flex max-md:flex-col max-xl:ml-4 max-md:ml-0">
<h1 class="py-2 text-left text-5xl font-semibold max-md:py-0 max-md:text-center max-md:text-2xl">
Testing.
</h1>
<div class="w-full max-w-screen-xl max-xl:ml-4 max-md:ml-0 max-md:flex max-md:flex-col dark:text-white">
<h1 class="py-2 text-left text-5xl font-semibold max-md:py-0 max-md:text-center max-md:text-2xl">Testing.</h1>
<h2
class="1 bg-gradient-to-r from-green-500 to-green-300 bg-clip-text py-2 text-left text-5xl font-semibold text-transparent max-md:text-center max-md:text-2xl"
>
Expand All @@ -24,18 +22,12 @@
Downloads
</button>
<a href="https://docs.mockbukkit.org" target="_blank" rel="noopener noreferrer" title="Documentation">
<button
v-if="false"
class="mx-4 rounded-md border-2 border-gray-600 px-5 py-1 transition duration-200 ease-in-out hover:scale-105"
>
<button v-if="false" class="mx-4 rounded-md border-2 border-gray-600 px-5 py-1 transition duration-200 ease-in-out hover:scale-105">
Documentation
</button>
</a>
<a href="https://docs.mockbukkit.org" target="_blank" rel="noopener noreferrer" title="Documentation">
<button
v-if="true"
class="rounded-md border-2 border-gray-600 px-5 py-1 transition duration-200 ease-in-out hover:scale-105"
>
<button v-if="true" class="rounded-md border-2 border-gray-600 px-5 py-1 transition duration-200 ease-in-out hover:scale-105">
Documentation
</button>
</a>
Expand Down
Loading