From 4cb8902c62a84937085ce3430ea369a8de1bbd2c Mon Sep 17 00:00:00 2001 From: Nitrrine <43351072+Nitrrine@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:59:20 +0500 Subject: [PATCH] Automatically check new commits with Prettier (#23) * Automatically check new commits with Prettier * Format all files with Prettier * Make prettier to run on push too --- .../ISSUE_TEMPLATE/01-add-an-alternative.md | 7 ++--- .../01-add-an-alternative.md | 7 ++--- .../PULL_REQUEST_TEMPLATE/02-site-changes.md | 5 ++-- .../PULL_REQUEST_TEMPLATE/03-chore-stuff.md | 1 - .github/workflows/prettier-check.yml | 30 +++++++++++++++++++ .vscode/extensions.json | 4 +-- README.md | 2 +- pages/index.vue | 2 +- 8 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/ISSUE_TEMPLATE/01-add-an-alternative.md b/.github/ISSUE_TEMPLATE/01-add-an-alternative.md index 5217a50..19d79da 100644 --- a/.github/ISSUE_TEMPLATE/01-add-an-alternative.md +++ b/.github/ISSUE_TEMPLATE/01-add-an-alternative.md @@ -3,10 +3,9 @@ name: Add an alternative to the list about: Suggest the inclusion of a new mod that can replace an Essential function. title: "Add [mod] to the alternatives page." labels: enhancement -assignees: -- KTrain5169 -- blryface - +assignees: + - KTrain5169 + - blryface --- ## What part(s) of Essential does this mod replace? diff --git a/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md b/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md index 4bc1d05..3fc406d 100644 --- a/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md +++ b/.github/PULL_REQUEST_TEMPLATE/01-add-an-alternative.md @@ -3,10 +3,9 @@ name: Adding new alternative about: Select this if you are adding a new mod to the alternatives page. title: "add: [mod name] to alternatives page" labels: enhancement -assignees: -- KTrain5169 -- blryface - +assignees: + - KTrain5169 + - blryface --- ## What part(s) of Essential does this mod replace? diff --git a/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md b/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md index 5a57fe1..8912639 100644 --- a/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md +++ b/.github/PULL_REQUEST_TEMPLATE/02-site-changes.md @@ -4,9 +4,8 @@ about: Select this if you changed the website in a different way. title: "change/fix (choose one): [short description of the change]" labels: enhancement assignees: -- blryface -- WorldWidePixel - + - blryface + - WorldWidePixel --- ## Are there major changes (ex: signficantly revamping the website visuals) that we NEED to know about? diff --git a/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md b/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md index 2ec97af..a62a2af 100644 --- a/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md +++ b/.github/PULL_REQUEST_TEMPLATE/03-chore-stuff.md @@ -4,7 +4,6 @@ about: Select this if you are modifying something that won't affect what other p title: "chore: [short description of changes go here]" labels: documentation assignees: KTrain5169 - --- ## What have you changed? diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..5c30957 --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,30 @@ +name: "Prettier Check" + +on: + push: + pull_request: + +jobs: + check-prettier: + name: Prettier Check + runs-on: ubuntu-latest + steps: + - name: Download repo + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Use Node.js v20.15.0 + uses: actions/setup-node@v4 + with: + node-version: "20.15.0" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: Check code with Prettier + run: pnpm exec prettier --check . diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 79e80ed..c83e263 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["esbenp.prettier-vscode"] -} \ No newline at end of file + "recommendations": ["esbenp.prettier-vscode"] +} diff --git a/README.md b/README.md index 0d0485a..aaacb6d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # NotEssential website -A website linking to mods that can substitute Essential's features. \ No newline at end of file +A website linking to mods that can substitute Essential's features. diff --git a/pages/index.vue b/pages/index.vue index 2f1e31d..67141d2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -34,4 +34,4 @@ useSeoMeta({ "Essential has many issues. This website tells why, and provides alternatives.", ogImage: "/img/icon512.png", }) - \ No newline at end of file +