mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-06-10 00:49:30 +00:00
Compare commits
10 commits
196ef12764
...
4e9139f73e
Author | SHA1 | Date | |
---|---|---|---|
|
4e9139f73e | ||
|
e5bffdb889 | ||
|
c2316e8f3d | ||
|
19247de2b8 | ||
|
f91ac5f04d | ||
|
0db2a4235f | ||
|
8d2b9c8dc9 | ||
|
9f52b894f5 | ||
|
c7471e07c0 | ||
|
dc3a805fc7 |
8 changed files with 1146 additions and 23 deletions
5
.commitlintrc
Normal file
5
.commitlintrc
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
}
|
39
.github/workflows/commitlint.yml
vendored
Normal file
39
.github/workflows/commitlint.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: Commitlint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
name: Run commitlint scanning
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [23.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: yarn
|
||||
|
||||
- name: Install commitlint
|
||||
run: |
|
||||
yarn add conventional-changelog-conventionalcommits
|
||||
yarn add commitlint@latest
|
||||
|
||||
- name: Validate current commit (last commit) with commitlint
|
||||
if: github.event_name == 'push'
|
||||
run: npx commitlint --last --verbose
|
||||
|
||||
- name: Validate PR commits with commitlint
|
||||
if: github.event_name == 'pull_request'
|
||||
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
1
.husky/commit-msg
Normal file
1
.husky/commit-msg
Normal file
|
@ -0,0 +1 @@
|
|||
yarn dlx commitlint --edit \
|
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
|
@ -0,0 +1 @@
|
|||
yarn lint-staged
|
1
.husky/pre-push
Normal file
1
.husky/pre-push
Normal file
|
@ -0,0 +1 @@
|
|||
yarn compile
|
12
.lintstagedrc.mjs
Normal file
12
.lintstagedrc.mjs
Normal file
|
@ -0,0 +1,12 @@
|
|||
import path from 'path';
|
||||
import process from 'process';
|
||||
|
||||
const buildEslintCommand = (filenames) =>
|
||||
`eslint ${filenames.map((f) => path.relative(process.cwd(), f))}`;
|
||||
|
||||
const prettierCommand = 'prettier --write';
|
||||
|
||||
export default {
|
||||
'*.{js,mjs,ts,mts}': [prettierCommand, buildEslintCommand],
|
||||
'*.{json}': [prettierCommand],
|
||||
};
|
11
package.json
11
package.json
|
@ -14,16 +14,19 @@
|
|||
"restart": "pm2 restart poixpixel-discord-bot",
|
||||
"lint": "npx eslint ./src && npx tsc --noEmit",
|
||||
"format": "prettier --check --ignore-path .prettierignore .",
|
||||
"format:fix": "prettier --write --ignore-path .prettierignore ."
|
||||
"format:fix": "prettier --write --ignore-path .prettierignore .",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@napi-rs/canvas": "^0.1.68",
|
||||
"discord.js": "^14.18.0",
|
||||
"drizzle-orm": "^0.40.0",
|
||||
"drizzle-orm": "^0.40.1",
|
||||
"ioredis": "^5.6.0",
|
||||
"pg": "^8.14.0"
|
||||
"pg": "^8.14.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.8.0",
|
||||
"@commitlint/config-conventional": "^19.8.0",
|
||||
"@eslint/eslintrc": "^3.3.0",
|
||||
"@eslint/js": "^9.22.0",
|
||||
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
||||
|
@ -35,6 +38,8 @@
|
|||
"eslint": "^9.22.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"globals": "^16.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.0",
|
||||
"prettier": "3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.19.3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue