From ae4f3e80b6a5dcd99cb1e31130327ce42095619a Mon Sep 17 00:00:00 2001 From: diy0r Date: Thu, 5 Sep 2024 00:01:45 +0500 Subject: [PATCH 1/2] chore: optimize commit lint --- .github/workflows/checker.yaml | 39 +++++++++++----------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/checker.yaml b/.github/workflows/checker.yaml index 131e413..5e425c1 100644 --- a/.github/workflows/checker.yaml +++ b/.github/workflows/checker.yaml @@ -1,41 +1,26 @@ -name: checker +name: Testing CI on: workflow_dispatch: pull_request: - branches: [main] - push: - branches: [main] jobs: commitlint: environment: commitlint runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install required dependencies - run: | - sudo apt update - sudo apt install -y sudo - sudo apt install -y git curl - curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs - - name: Print versions - run: | - git --version - node --version - npm --version - npx commitlint --version + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install commitlint run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest - - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: npx commitlint --last --verbose + npm install -g commitlint@latest @commitlint/{config-conventional,cli}@latest - name: Validate PR commits with commitlint if: github.event_name == 'pull_request' @@ -43,7 +28,7 @@ jobs: lint-and-test: environment: lint-and-test - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: node: @@ -55,12 +40,12 @@ jobs: - windows-latest - macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} From 957dddd7473dac1afb06b6ba49c9bc368eae9e4d Mon Sep 17 00:00:00 2001 From: diy0r Date: Thu, 5 Sep 2024 00:58:44 +0500 Subject: [PATCH 2/2] chore: no-unused-vars set off --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 546caef..b8a03f8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -42,7 +42,7 @@ export default tseslint.config( ...eslintConfigPrettier.rules, 'max-lines': 'off', 'max-params': ['error', 3], - 'no-unused-vars': 'warn', + 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'warn', '@typescript-eslint/no-explicit-any': 'off', 'prettier/prettier': [