From ad491d69e8c2309b20c41d4e10dc204a19905a3d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 1 Feb 2026 17:17:16 +0300 Subject: [PATCH] meta: move config files to typescript Signed-off-by: NotAShelf Change-Id: I60de4abb5b81c4b14d95d7b6f1da8aa66a6a6964 --- config.example.ts | 16 ++++++++++++++++ eslint.config.mjs => eslint.config.ts | 7 ++++--- prettier.config.mjs => prettier.config.ts | 6 +++++- 3 files changed, 25 insertions(+), 4 deletions(-) rename eslint.config.mjs => eslint.config.ts (76%) rename prettier.config.mjs => prettier.config.ts (75%) diff --git a/config.example.ts b/config.example.ts index 513c8bc..d922e4d 100644 --- a/config.example.ts +++ b/config.example.ts @@ -3,8 +3,24 @@ import type { Config } from './src/types'; const config: Config = { server: { port: 3000, + // host: '0.0.0.0', // Uncomment to bind to all interfaces (default is localhost only) }, + // Dashboard configuration (optional) + // dashboard: { + // enabled: true, + // // Authentication options (choose one): + // auth: { + // // Option 1: Basic HTTP authentication + // type: 'basic', + // username: 'admin', + // password: 'changeme', + // // Option 2: Bearer token authentication + // // type: 'token', + // // token: 'your-secret-token-here', + // }, + // }, + repositories: [ // Leave empty to accept webhooks from any repo. // { owner: "myorg", repo: "myrepo" }, diff --git a/eslint.config.mjs b/eslint.config.ts similarity index 76% rename from eslint.config.mjs rename to eslint.config.ts index 57ccfab..4a51839 100644 --- a/eslint.config.mjs +++ b/eslint.config.ts @@ -2,9 +2,9 @@ import tseslint from '@typescript-eslint/eslint-plugin'; import tsparser from '@typescript-eslint/parser'; export default [ + { ignores: ['dist/**', 'node_modules/**', '**/*.d.ts'] }, { - files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], - ignores: ['dist/**', 'node_modules/**'], + files: ['src/**/*.ts', '**/*.js', 'config.example.ts', 'tsup.config.ts'], languageOptions: { ecmaVersion: 2022, sourceType: 'module', @@ -19,8 +19,9 @@ export default [ }, }, plugins: { - '@typescript-eslint': tseslint, + '@typescript-eslint': tseslint as unknown as Record, }, + rules: { ...tseslint.configs.recommended.rules, '@typescript-eslint/no-explicit-any': 'warn', diff --git a/prettier.config.mjs b/prettier.config.ts similarity index 75% rename from prettier.config.mjs rename to prettier.config.ts index e218dce..218a5fa 100644 --- a/prettier.config.mjs +++ b/prettier.config.ts @@ -1,4 +1,6 @@ -export default { +import type { Config } from 'prettier'; + +const config: Config = { printWidth: 100, tabWidth: 2, useTabs: false, @@ -13,3 +15,5 @@ export default { endOfLine: 'lf', plugins: [], }; + +export default config;