From 0295940d34065888d9ce4ed92091d9f94b6c6bf9 Mon Sep 17 00:00:00 2001 From: LFK <77980399+LucasFKobernic@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:25:27 +0000 Subject: [PATCH 1/2] Add Workflow 'linting' --- .github/workflows/linting.yaml | 16 ++++++++++++++++ package.json | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/linting.yaml diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml new file mode 100644 index 0000000..18cf4c2 --- /dev/null +++ b/.github/workflows/linting.yaml @@ -0,0 +1,16 @@ +name: Linting + +on: pull_request + +jobs: + prettier: + name: Prettier + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "lts/hydrogen" + - run: npm ci + - run: npm run lint:prettier:check diff --git a/package.json b/package.json index 4abdd92..e2af3f4 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "services:up": "docker compose -f infra/compose.yaml up -d", "services:stop": "docker compose -f infra/compose.yaml stop", "services:down": "docker compose -f infra/compose.yaml down", - "lint:check": "prettier --check .", - "lint:fix": "prettier --write .", + "lint:prettier:check": "prettier --check .", + "lint:prettier:fix": "prettier --write .", "test": "npm run services:up && concurrently --names next,jest --hide next --kill-others --success command-jest \"next dev\" \"jest --runInBand\" ", "test:watch": "jest --watchAll --runInBand", "migration:create": "node-pg-migrate -m infra/migrations create", From f0e59500f5933ab4c8ac4826dc60773f2186521f Mon Sep 17 00:00:00 2001 From: LFK <77980399+LucasFKobernic@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:34:20 +0000 Subject: [PATCH 2/2] fix prettier style link --- infra/migrations/1710593780077_test-migration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/migrations/1710593780077_test-migration.js b/infra/migrations/1710593780077_test-migration.js index fbce4d4..ca088d9 100644 --- a/infra/migrations/1710593780077_test-migration.js +++ b/infra/migrations/1710593780077_test-migration.js @@ -2,6 +2,6 @@ exports.shorthands = undefined; -exports.up = pgm => {}; +exports.up = (pgm) => {}; -exports.down = pgm => {}; +exports.down = (pgm) => {};