Skip to content

Commit

Permalink
Merge pull request #14 from liviomendonca/lint-format-action
Browse files Browse the repository at this point in the history
adds  Linting  GitHub Action
  • Loading branch information
liviomendonca authored Sep 23, 2024
2 parents c3b7d23 + c49da25 commit add0fc6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "lts/hydrogen"
Expand Down
12 changes: 6 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"PKief.material-icon-theme",
"editorconfig.editorconfig",
"esbenp.prettier-vscode"
]
}
"recommendations": [
"PKief.material-icon-theme",
"editorconfig.editorconfig",
"esbenp.prettier-vscode"
]
}
4 changes: 2 additions & 2 deletions infra/migrations/1724002389197_teste-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

exports.shorthands = undefined;

exports.up = pgm => {};
exports.up = (pgm) => {};

exports.down = pgm => {};
exports.down = (pgm) => {};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 -n next,jest --hide next -k -s command-jest \"next dev\" \"jest --runInBand\"",
"test:watch": "jest --watchAll --runInBand",
"migration:create": "node-pg-migrate -m infra/migrations create",
Expand Down

0 comments on commit add0fc6

Please sign in to comment.