Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Commit Lint

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Lint Commit Messages
uses: wagoid/commitlint-github-action@v6
permissions:
contents: read
pull-requests: read
21 changes: 21 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js 23
uses: actions/setup-node@v4
with:
node-version: 23
cache: 'npm'
- run: npm ci --legacy-peer-deps
- run: npm run lint
25 changes: 25 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'header-max-length': [2, 'always', 64],
'body-max-line-length': [2, 'always', 72],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'impr',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "npm run build && npm run softstart",
"softstart": "node --max-old-space-size=8192 --no-warnings --harmony-temporal ./dist/src/index.js",
"build": "rm -rf ./dist && tsc && tsc-alias",
"lint:fix": "eslint --ext .ts ./src --fix"
"lint:fix": "eslint --ext .ts ./src --fix",
"lint": "eslint --ext .ts ./src"
},
"author": "",
"license": "ISC",
Expand Down