From a18120a12585a25f2aa21c7f73d4d3c9ae83b1d2 Mon Sep 17 00:00:00 2001 From: Daniel Izdebski Date: Wed, 20 Sep 2023 18:08:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20chore(ci):=20Add=20linting=20wor?= =?UTF-8?q?kflow=20(#886)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/README.md | 4 ++++ .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ .nvmrc | 1 + 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .nvmrc diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 881ae760d..57fb0f63a 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -5,3 +5,7 @@ CI Workflows ## [🦄 pr.yml](pr.yml) Runs on every pull request and validates whether the PR title follows the [Gitmoji](https://gitmoji.dev/specification) and the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) specifications. + +## [🎨 lint.yml](lint.yml) + +Checks the code style of the project. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..ce9881432 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: 🎨 Lint + +on: + push: + branches: + - new-dawn + pull_request: + +jobs: + style: + name: Check code style + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + with: + version: 8.7.6 + + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + registry-url: https://registry.npmjs.org + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Check linter + run: pnpm run lint:check + + - name: Check order in package.json + if: success() || failure() # Run even if linting fails + run: pnpm run sort-package-json:check diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..860cc5000 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.17.1