Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

chore(tools): update workflows #881

Merged
merged 1 commit into from
Dec 5, 2021
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
34 changes: 22 additions & 12 deletions .github/workflows/prettier-lint-check.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# @see https://github.com/EddieJaoudeCommunity/awesome-github-profiles/issues/173
name: Prettier Lint checker to find any syntax/spacing/best practices tweaks.
name: Prettier

# @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
# "Push" is every commit to any branch, whilst "pull_request" includes update commits to PRs.
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
prettier:
name: Prettier Linting
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,14 +29,13 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Prettify code
uses: creyD/prettier_action@v3.1
- name: Load Node.js
uses: actions/setup-node@v2
with:
# We only check ONLY_CHANGED as this is a PR action
only_changed: True
# We specify the prettier checker to not automatically overwrite the files.
dry: True
# This defaults to only "**/*.js", so we specify what we have as file extensions here.
prettier_options: --write **/*.{md,json,yml,yaml}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
node-version: ${{ matrix.node-version }}

- name: Install Deps
run: npm ci

- name: Run Prettier
run: npm run lint
1 change: 0 additions & 1 deletion .prettierrc.json

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
tabWidth: 2

overrides:
# We need to respect that YAML files use 4 spaces.
- files:
- "*.yml"
- "**/*.yml"
- "*.yaml"
- "**/*.yaml"
options:
tabWidth: 4