Skip to content

Commit 51a0c9d

Browse files
committed
initialize project structure with TypeScript, ESLint, Prettier, and Husky setup
1 parent d9bb922 commit 51a0c9d

File tree

2,953 files changed

+4098
-302830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,953 files changed

+4098
-302830
lines changed

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copy this file to .env and fill with your real values
2+
DISCORD_TOKEN=
3+
CLIENT_ID=
4+
PUBLIC_KEY=
5+
GUILD_ID_TEST=
6+
GUILD_ID_PROD=
7+
DEPLOY_TARGET=test # default to 'test' or 'prod' when running deploy-commands
8+

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+

.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
ecmaVersion: 2022,
5+
sourceType: 'module'
6+
},
7+
plugins: ['@typescript-eslint'],
8+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
9+
env: {
10+
node: true,
11+
es2022: true
12+
},
13+
rules: {
14+
'no-console': 'off',
15+
'@typescript-eslint/no-explicit-any': 'off'
16+
}
17+
};
18+

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
run: bun run lint
3+
- name: Lint
4+
run: bun run typecheck
5+
- name: Typecheck
6+
run: bun install
7+
- name: Install dependencies
8+
uses: oven-sh/bun@v1
9+
- name: Setup Bun
10+
- uses: actions/checkout@v4
11+
steps:
12+
runs-on: ubuntu-latest
13+
build:
14+
jobs:
15+
16+
branches: [main]
17+
push:
18+
pull_request:
19+
on:
20+
21+

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env
2+
node_modules/
3+
dist/
4+
.env.local
5+
.DS_Store
6+
coverage/
7+

.husky/_/husky.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env sh
2+
if [ -z "$husky_skip_init" ]; then
3+
debug () {
4+
if [ "$HUSKY_DEBUG" = "1" ]; then
5+
echo "husky (debug) - $1"
6+
fi
7+
}
8+
9+
readonly hook_name="$(basename -- "$0")"
10+
debug "starting $hook_name..."
11+
12+
if [ "$HUSKY" = "0" ]; then
13+
debug "HUSKY env variable is set to 0, skipping hook"
14+
exit 0
15+
fi
16+
17+
if [ -f ~/.huskyrc ]; then
18+
debug "sourcing ~/.huskyrc"
19+
. ~/.huskyrc
20+
fi
21+
22+
readonly husky_skip_init=1
23+
export husky_skip_init
24+
sh -e "$0" "$@"
25+
exitCode="$?"
26+
27+
if [ $exitCode != 0 ]; then
28+
echo "husky - $hook_name hook exited with code $exitCode (error)"
29+
fi
30+
31+
if [ $exitCode = 127 ]; then
32+
echo "husky - command not found in PATH=$PATH"
33+
fi
34+
35+
exit $exitCode
36+
fi
37+

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")"/../.husky/_/husky.sh
3+
4+
npx --no-install lint-staged
5+

.idea/Bot_Discord.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.ask2agent.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)