Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(commitlint): add defineConfig #17

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(commitlint): add defineConfig
  • Loading branch information
nikkeyl committed Mar 20, 2024
commit 3aa33615195504207973e1c31b6bb934a6ff4b00
20 changes: 18 additions & 2 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,11 @@ name: Commit Lint

on:
pull_request:
branches-ignore:
- dependabot/*
push:
branches-ignore:
- dependabot/*

jobs:
commit-lint:
@@ -11,11 +15,23 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10

if: ${{ github.actor != 'dependabot[bot]' }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v3
with:
version: 8

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*

- name: Install Dependencies
run: pnpm i

- name: Lint
uses: wagoid/commitlint-github-action@v5
27 changes: 22 additions & 5 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
import type { UserConfig } from '@commitlint/types';
import { defineConfig } from '@archoleat/commitlint-define-config';

const commitLintConfig: UserConfig = {
export default defineConfig({
extends: ['@commitlint/config-conventional'],
};

export default commitLintConfig;
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'spec',
'style',
],
],
},
});
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -39,8 +39,7 @@
"type": "module",
"types": "index.d.ts",
"exports": {
".": "./index.js",
"./*": "./commitlint.config.ts"
".": "./index.js"
},
"files": [
"index.d.ts",
@@ -60,10 +59,10 @@
"commit": "cz"
},
"devDependencies": {
"@archoleat/commitlint-define-config": "^1.0.0",
"@archoleat/semantic-release-define-config": "file:",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@commitlint/types": "^18.6.1",
"@commitlint/config-conventional": "^19.1.0",
"@rollup/plugin-typescript": "^11.1.6",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
Loading
Loading