Skip to content

Commit f39eb16

Browse files
committed
ci: fix quality checks and update ESLint configuration
1 parent 8d2a327 commit f39eb16

4 files changed

Lines changed: 51 additions & 4 deletions

File tree

eslint.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
export default tseslint.config(
5+
eslint.configs.recommended,
6+
...tseslint.configs.recommended,
7+
{
8+
rules: {
9+
'@typescript-eslint/no-explicit-any': 'off',
10+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
11+
'@typescript-eslint/ban-ts-comment': 'off',
12+
'no-empty': 'off',
13+
'no-control-regex': 'off',
14+
},
15+
},
16+
{
17+
ignores: ['dist/**', 'node_modules/**', 'scripts/**'],
18+
},
19+
);

package-lock.json

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

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"build": "tsc",
1818
"build:sea": "node scripts/build-sea.js",
19-
"lint": "eslint . --ext .ts",
19+
"lint": "eslint .",
2020
"type-check": "tsc --noEmit",
2121
"format:check": "prettier --check \"**/*.{ts,json,md}\"",
2222
"start": "node --no-deprecation --no-warnings dist/src/cli.js start",
@@ -48,6 +48,7 @@
4848
"update-notifier": "^7.3.1"
4949
},
5050
"devDependencies": {
51+
"@eslint/js": "^9.39.2",
5152
"@types/eventsource": "^1.1.15",
5253
"@types/node": "^22.13.1",
5354
"@types/update-notifier": "^6.0.8",
@@ -58,6 +59,7 @@
5859
"prettier": "^3.8.1",
5960
"ts-node": "^10.9.2",
6061
"typescript": "^5.9.3",
62+
"typescript-eslint": "^8.54.0",
6163
"vitest": "^4.0.18"
6264
},
6365
"overrides": {

src/setup/wizard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ const DISCORD_DEV_URL = 'https://discord.com/developers/applications';
88
const BOT_PERMISSIONS = '2147534848';
99
const BOT_SCOPES = 'bot applications.commands';
1010

11-
function validateApplicationId(value: string): string | undefined {
11+
function validateApplicationId(value: string | undefined): string | undefined {
1212
if (!value) return 'Application ID is required';
1313
if (!/^\d{17,20}$/.test(value)) return 'Invalid format (should be 17-20 digits)';
1414
return undefined;
1515
}
1616

17-
function validateToken(value: string): string | undefined {
17+
function validateToken(value: string | undefined): string | undefined {
1818
if (!value) return 'Bot token is required';
1919
if (value.length < 50) return 'Invalid token format (too short)';
2020
return undefined;
2121
}
2222

23-
function validateGuildId(value: string): string | undefined {
23+
function validateGuildId(value: string | undefined): string | undefined {
2424
if (!value) return 'Guild ID is required';
2525
if (!/^\d{17,20}$/.test(value)) return 'Invalid format (should be 17-20 digits)';
2626
return undefined;

0 commit comments

Comments
 (0)