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